IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_warehouse_operation_history]') AND type = 'U')
CREATE TABLE [dbo].[mps_warehouse_operation_history]
(
    [whop_id] bigint NOT NULL DEFAULT((0)),
    [whop_cmpid] int NULL DEFAULT((0)),
    [whop_tag] int NULL DEFAULT((0)),
    [whop_prdid] bigint NULL DEFAULT((0)),
    [whop_whid] int NOT NULL DEFAULT((0)),
    [whop_whid2] int NOT NULL DEFAULT((0)),
    [whop_opdate] datetime NULL DEFAULT(getdate()),
    [whop_operation] int NULL DEFAULT((0)),
    [whop_value] decimal(18, 4) NULL DEFAULT((0)),
    [whop_valuesuspend] decimal(18, 4) NULL DEFAULT((0)),
    [whop_bizid] int NULL DEFAULT((0)),
    [whop_type] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [whop_no] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [whop_ordid] bigint NULL DEFAULT((0)),
    [whop_branch] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [whop_depart] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [whop_creator] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [whop_jbid] bigint NULL DEFAULT((0)),
    [whop_unit] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [whop_batch] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [whop_price] decimal(18, 4) NULL DEFAULT((0)),
    [whop_expire] datetime NULL DEFAULT('1900-01-01'),
    [whop_note] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [whop_location] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [whop_accountdate] varchar(10) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    CONSTRAINT [PK_mps_warehouse_operation_history] PRIMARY KEY ([whop_id] ASC)
)