IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_ding_myapp]') AND type = 'U')
CREATE TABLE [dbo].[mps_ding_myapp]
(
    [dm_id] int NOT NULL IDENTITY(1, 1),
    [dm_cuid] int NULL DEFAULT((0)),
    [dm_bizid] int NULL DEFAULT((0)),
    [dm_type] int NULL DEFAULT((0)),
    [dm_category] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [dm_title] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [dm_icon] nvarchar(80) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [dm_subcategory] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [dm_url] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    CONSTRAINT [PK__mps_ding__56130D9A2D0A7DE2] PRIMARY KEY ([dm_id] ASC)
)


IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[mps_ding_myapp]') AND name = 'mps_ding_myapp_cuid_index')
CREATE NONCLUSTERED INDEX [mps_ding_myapp_cuid_index] ON [dbo].[mps_ding_myapp]([dm_cuid] ASC)