IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_loginlog]') AND type = 'U')
CREATE TABLE [dbo].[mps_loginlog]
(
    [lg_id] bigint NOT NULL IDENTITY(1, 1),
    [lg_cmpid] int NULL DEFAULT((0)),
    [lg_cuid] int NULL DEFAULT((0)),
    [lg_ip] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [lg_device] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [lg_site] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [lg_time] datetime NULL DEFAULT(getdate()),
    [lg_usertype] int NULL DEFAULT((0)),
    [lg_username] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [lg_objid] bigint NULL DEFAULT(''),
    CONSTRAINT [PK_MPS_ONLINELOG] PRIMARY KEY ([lg_id] ASC)
)