SET NAMES utf8;

SET FOREIGN_KEY_CHECKS=0;

REPLACE INTO `t_affair_system_column` (`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES ('304', '0', '9', '10', '自建来源', 'self_built_source', '[{\"key\":\"all\",\"value\":\"\"}]', '{\"key\":\"string\",\"value\":\"255\"}', '11', '{\"regex\":\"\",\"tips\":\"自建来源\"}', '0', '', '0', NULL);

ALTER TABLE `t_inventory_calculation` ADD COLUMN IF NOT EXISTS `self_built_source`  varchar(255) NOT NULL AFTER `from_affair_id`;

ALTER TABLE `t_rule_new` ADD COLUMN IF NOT EXISTS `product_modular_push` tinyint(1) NULL DEFAULT 0 AFTER `product_modular_supplier`;

ALTER TABLE `t_rule_new` ADD COLUMN IF NOT EXISTS `material_modular_push` tinyint(1) NULL DEFAULT 0 AFTER `material_modular_delete`;

ALTER TABLE `t_collection` ADD COLUMN IF NOT EXISTS `push_result` longtext NULL AFTER `product_product_price`;

ALTER TABLE `t_collection` ADD COLUMN IF NOT EXISTS `recv_result` longtext NULL AFTER `push_result`;

ALTER TABLE `t_product` ADD COLUMN IF NOT EXISTS `push_result` longtext NULL AFTER `product_gram_weight_unit`;

ALTER TABLE `t_product` ADD COLUMN IF NOT EXISTS `recv_result` longtext NULL AFTER `push_result`;

SET FOREIGN_KEY_CHECKS=1;