IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_flowworkstatus_data_history]') AND type = 'U')
CREATE TABLE [dbo].[mps_flowworkstatus_data_history]
(
    [wsd_id] int NOT NULL IDENTITY(1, 1),
    [wsd_wsid] int NULL DEFAULT((0)),
    [wsd_tobjtype] varchar(20) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [wsd_tobjid] int NULL DEFAULT((0)),
    [wsd_tobjid2] int NULL DEFAULT((0)),
    [wsd_sord2tag] int NULL DEFAULT((0)),
    [wsd_updatesql] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [wsd_sql] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [wsd_use] int NULL DEFAULT((0)),
    [wsd_keyfield] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    CONSTRAINT [PK_MPS_FLOWWORKSTATUS_DATA_HIS] PRIMARY KEY ([wsd_id] ASC)
)