IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_forum]') AND type = 'U')
CREATE TABLE [dbo].[mps_forum]
(
    [fm_id] bigint NOT NULL IDENTITY(1, 1),
    [fm_cmpid] int NULL DEFAULT((0)),
    [fm_bcid] int NULL DEFAULT((0)),
    [fm_branch] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [fm_dpid] int NULL DEFAULT((0)),
    [fm_depart] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [fm_usertype] int NULL DEFAULT((0)),
    [fm_cuid] int NULL DEFAULT((0)),
    [fm_cuname] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [fm_type] varchar(20) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [fm_ctgid] int NULL DEFAULT((0)),
    [fm_objid] bigint NULL DEFAULT((0)),
    [fm_createdtime] datetime NULL DEFAULT(getdate()),
    [fm_updatedtime] datetime NULL DEFAULT(getdate()),
    [fm_like] int NULL DEFAULT((0)),
    [fm_dislike] int NULL DEFAULT((0)),
    [fm_ffmid] bigint NULL DEFAULT((0)),
    [fm_text] ntext(8) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [fm_view] int NULL DEFAULT((0)),
    [fm_attach] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [fm_fffmid] bigint NOT NULL DEFAULT((0)),
    [fm_fcuid] bigint NOT NULL DEFAULT((0)),
    [fm_fcuname] nvarchar(255) COLLATE Chinese_PRC_CI_AS NOT NULL DEFAULT(''),
    [fm_ebstag] int NOT NULL DEFAULT((0)),
    [fm_manage] int NOT NULL DEFAULT((1)),
    [fm_work] varchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL DEFAULT(''),
    [fm_workstatus] int NOT NULL DEFAULT((0)),
    [fm_workcuid] int NOT NULL DEFAULT((0)),
    CONSTRAINT [PK_mps_forum] PRIMARY KEY ([fm_id] ASC)
)