IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_job_users]') AND type = 'U')
CREATE TABLE [dbo].[mps_job_users]
(
    [jp_type] varchar(30) COLLATE Chinese_PRC_CI_AS NOT NULL DEFAULT(''),
    [jp_group] int NOT NULL DEFAULT((0)),
    [jp_jbid] bigint NOT NULL DEFAULT((0)),
    [jp_cuid] int NOT NULL DEFAULT((0)),
    [jp_sjbid] bigint NULL DEFAULT((0)),
    CONSTRAINT [PK_MPS_JOB_USERS] PRIMARY KEY ([jp_type] ASC,[jp_group] ASC,[jp_jbid] ASC,[jp_cuid] ASC)
)

ALTER TABLE [dbo].[mps_job_users] WITH CHECK ADD CONSTRAINT [FK_MPS_JOB__REFERENCE_MPS_JOB] FOREIGN KEY ([jp_jbid]) REFERENCES [dbo].[mps_job] ([jb_id]) ON DELETE CASCADEALTER TABLE [dbo].[mps_job_users] CHECK CONSTRAINT [FK_MPS_JOB__REFERENCE_MPS_JOB]