@caijinlin
2015-12-28T14:48:22.000000Z
字数 1940
阅读 527
lingxi
INSERT INTO `lingxi_config`.`crowdfunding_option_keys` (`id`, `type`, `scope`, `option_name`, `display_name`, `is_required`, `max_num`, `desc`, `append_tip`, `column_type`, `class`, `update_time`, `create_time`) VALUES (NULL, 'crowdfunding,together,basic', '0', 'success_number_limit', '数量上限', '0', '0', '支付人数到指定数量后自动停止', NULL, 'input', NULL, NULL, NULL);
INSERT INTO `lingxi_config`.`crowdfunding_option_keys` (`id`, `type`, `scope`, `option_name`, `display_name`, `is_required`, `max_num`, `desc`, `append_tip`, `column_type`, `class`, `update_time`, `create_time`) VALUES (NULL, 'crowdfunding,together,basic', '0', 'success_number_limit_num', '数量上线数量', '0', '0', NULL, NULL, 'input', NULL, NULL, NULL);
INSERT INTO `lingxi_config`.`crowdfunding_option_keys` (`id`, `type`, `scope`, `option_name`, `display_name`, `is_required`, `max_num`, `desc`, `append_tip`, `column_type`, `class`, `update_time`, `create_time`) VALUES (NULL, 'crowdfunding,together,basic', '0', 'goal_num', '捐款目标', '0', '0', '筹款金额到指定数量后自动停止', NULL, 'input', NULL, NULL, NULL);
INSERT INTO `lingxi_config`.`crowdfunding_option_keys` (`id`, `type`, `scope`, `option_name`, `display_name`, `is_required`, `max_num`, `desc`, `append_tip`, `column_type`, `class`, `update_time`, `create_time`) VALUES (NULL, 'crowdfunding,together,basic', '0', 'is_achieved_donatable', '筹款金额到指定数量后是否可捐赠', '0', '0', NULL, NULL, 'bool', NULL, NULL, NULL);
ALTER TABLE `crowdfunding_projects` ADD `expire` TINYINT(1) NULL DEFAULT '0' AFTER `end_time`;
sql
INSERT INTO `lingxi_config`.`crowdfunding_option_keys` (`id`, `type`, `scope`, `option_name`, `display_name`, `is_required`, `max_num`, `desc`, `append_tip`, `column_type`, `class`, `update_time`, `create_time`) VALUES (NULL, 'crowdfunding,together,basic', '0', 'expire_time', '结束时间', '0', '0', '到达指定时间后自动停止', NULL, 'datetime', NULL, NULL, NULL);
总而言之,上面的 sql,是将 结束时间 捐款目标 数量上限 三块整理到了 component 系统,原来 project 表有字段的,就只作为开关用了,其中 end_time 因为是 datetime 类型的,所以增加了字段 expire,上线需要将 end_time 的值迁移到 options.expire_time