IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_employee_manager]') AND type = 'U')
CREATE TABLE [dbo].[mps_employee_manager]
(
    [cum_cmpid] int NULL DEFAULT((0)),
    [cum_cuid] int NULL DEFAULT((0)),
    [cum_dpid] int NULL DEFAULT((0)),
    [cum_mcuid] int NULL DEFAULT((0)),
    [cum_level] int NULL DEFAULT((0)),
    [cum_isdepart] int NULL DEFAULT((1)),
    [cum_gradediff] int NULL DEFAULT((0)),
)

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

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