IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_flowwork_users]') AND type = 'U')
CREATE TABLE [dbo].[mps_flowwork_users]
(
    [wp_type] varchar(10) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [wp_wrkid] int NULL DEFAULT((0)),
    [wp_cuid] int NULL DEFAULT((0)),
    [wp_ppobjid1] int NULL DEFAULT((0)),
    [wp_ppobjid2] int NULL DEFAULT((0)),
)


IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[mps_flowwork_users]') AND name = 'AK_MPS_FLOWWORKS_USER_MPS_FLOW')
CREATE UNIQUE NONCLUSTERED INDEX [AK_MPS_FLOWWORKS_USER_MPS_FLOW] ON [dbo].[mps_flowwork_users]([wp_type] ASC,[wp_wrkid] ASC,[wp_cuid] ASC)