IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_attach]') AND type = 'U')
CREATE TABLE [dbo].[mps_attach]
(
    [da_id] bigint NOT NULL IDENTITY(1, 1),
    [da_cmpid] int NULL DEFAULT((0)),
    [da_bcid] int NULL DEFAULT((0)),
    [da_dpid] int NULL DEFAULT((0)),
    [da_type] varchar(20) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_objid] bigint NULL DEFAULT((0)),
    [da_objid2] bigint NULL DEFAULT((0)),
    [da_categoryid] int NULL DEFAULT((0)),
    [da_category] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_security] int NULL DEFAULT((0)),
    [da_filename] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_size] bigint NULL DEFAULT((0)),
    [da_ext] varchar(5) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_date] datetime NULL DEFAULT(getdate()),
    [da_cuid] int NULL DEFAULT((0)),
    [da_uploader] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_view] int NULL DEFAULT((0)),
    [da_download] int NULL DEFAULT((0)),
    [da_realname] varchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_md5] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_device] varchar(20) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_destory] decimal(8, 2) NULL DEFAULT((0)),
    [da_icopath] varchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_originname] varchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_uploaduuid] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [da_currentchunks] int NULL DEFAULT(''),
    [da_success] tinyint NULL DEFAULT(''),
    [da_fixpath] tinyint NULL DEFAULT(''),
    [da_preview] tinyint NULL DEFAULT(''),
    CONSTRAINT [PK_MPS_ATTACH] PRIMARY KEY ([da_id] ASC)
)