SET FOREIGN_KEY_CHECKS=0;

ALTER TABLE `clientcashincashout` ADD COLUMN `CreatorId` int NULL DEFAULT NULL COMMENT '创建人ID' AFTER `OptDate`;

ALTER TABLE `clientcashincashout` ADD COLUMN `CreatorName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CreatorId`;

ALTER TABLE `clientcashincashout` ADD COLUMN `CreateDate` datetime NULL DEFAULT NULL COMMENT '创建时间' AFTER `CreatorName`;

ALTER TABLE `clientcashincashout_product` ADD COLUMN `CreatorId` int NULL DEFAULT NULL COMMENT '创建人ID' AFTER `OptDate`;

ALTER TABLE `clientcashincashout_product` ADD COLUMN `CreatorName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CreatorId`;

ALTER TABLE `clientcashincashout_product` ADD COLUMN `CreateDate` datetime NULL DEFAULT NULL COMMENT '创建时间' AFTER `CreatorName`;

ALTER TABLE `clientcashincashout_remove` ADD COLUMN `CreatorId` int NULL DEFAULT NULL COMMENT '创建人ID' AFTER `OptDate`;

ALTER TABLE `clientcashincashout_remove` ADD COLUMN `CreatorName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CreatorId`;

ALTER TABLE `clientcashincashout_remove` ADD COLUMN `CreateDate` datetime NULL DEFAULT NULL COMMENT '创建时间' AFTER `CreatorName`;

ALTER TABLE `credit` ADD COLUMN `CreatorId` int NULL DEFAULT NULL COMMENT '创建人ID' AFTER `OptDate`;

ALTER TABLE `credit` ADD COLUMN `CreatorName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CreatorId`;

ALTER TABLE `credit` ADD COLUMN `CreateDate` datetime NULL DEFAULT NULL COMMENT '创建时间' AFTER `CreatorName`;

ALTER TABLE `credit_fromclient` ADD COLUMN `CreatorId` int NULL DEFAULT NULL COMMENT '创建人ID' AFTER `OptDate`;

ALTER TABLE `credit_fromclient` ADD COLUMN `CreatorName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CreatorId`;

ALTER TABLE `credit_fromclient` ADD COLUMN `CreateDate` datetime NULL DEFAULT NULL COMMENT '创建时间' AFTER `CreatorName`;

ALTER TABLE `manually_trade_observation_price` ADD COLUMN `ActiveUnderlyingCode` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '有效标的' AFTER `SettlementAmount`;

ALTER TABLE `supervise_report_position` ADD COLUMN `Trade_Number` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '交易编号' AFTER `ValueDate`;

ALTER TABLE `trade` ADD COLUMN `CreatorId` int NULL DEFAULT NULL COMMENT '创建人ID' AFTER `TradeSource`;

ALTER TABLE `trade` ADD COLUMN `CreatorName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CreatorId`;

ALTER TABLE `trade_cash` ADD COLUMN `ActiveUnderlyingCode` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '有效标的' AFTER `CreateTime`;

ALTER TABLE `trade_snowball` ADD COLUMN `PrepaymentConvertCashRate` double(18, 6) NULL DEFAULT NULL COMMENT '预付金折现率' AFTER `PrepaymentInterestRate`;

ALTER TABLE `trade_swap_flow` ADD COLUMN `CreatorId` int NULL DEFAULT NULL COMMENT '创建人ID' AFTER `OptDate`;

ALTER TABLE `trade_swap_flow` ADD COLUMN `CreatorName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `CreatorId`;

ALTER TABLE `trade_swap_flow` ADD COLUMN `CreateDate` datetime NULL DEFAULT NULL COMMENT '创建时间' AFTER `CreatorName`;

ALTER TABLE `valuedate` ADD COLUMN `PositionReportTradeDayCount` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '持仓报送报告的一年有效天数' AFTER `TradeDayCount`;

ALTER TABLE `valuedate` ADD COLUMN `AssetIds` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '浙期使用亚式保险+期货项目特殊模板的簿记' AFTER `TwoSideMarginValueDate`;

ALTER TABLE `trade_contract_document` ADD COLUMN `SealResult` tinyint NULL DEFAULT NULL COMMENT '电子章用印结果' AFTER `Comments`;

ALTER TABLE `trade_contract_document` ADD COLUMN `SealErrMsg` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '电子章用印错误信息' AFTER `SealResult`;

SET FOREIGN_KEY_CHECKS=1;

UPDATE valuedate set PositionReportTradeDayCount = TradeDayCount;