IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_template]') AND type = 'U')
CREATE TABLE [dbo].[mps_template]
(
    [tmp_id] int NOT NULL IDENTITY(1, 1),
    [tmp_cmpid] int NULL DEFAULT((0)),
    [tmp_type] varchar(10) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_objid] int NULL DEFAULT((0)),
    [tmp_objid2] int NULL DEFAULT((0)),
    [tmp_caption] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_form] text(16) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_js] text(16) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_css] text(16) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_formmobile] text(16) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_jsmobile] text(16) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_cssmobile] text(16) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_sql] text(16) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_jssql] varchar(8000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_flowxml] text(16) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_scope] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [tmp_language] varchar(20) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    CONSTRAINT [PK_MPS_TEMPLATE] PRIMARY KEY ([tmp_id] ASC)
)