| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- <?php
- namespace addons\DoubleCopy\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220920074446QimallAddonsDoubleCopyPoolSend
- */
- class M220920074446QimallAddonsDoubleCopyPoolSend extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "CREATE TABLE `qimall_addons_double_copy_pool_send` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `mall_id` int(10) NOT NULL DEFAULT '0' COMMENT '商城ID',
- `level` int(10) NOT NULL DEFAULT '0' COMMENT '等级(权重)',
- `total_bonus_money` decimal(12,2) DEFAULT '0.00' COMMENT '本次分红总额,单位:元',
- `bonus_num` int(10) DEFAULT '0' COMMENT '分红人数',
- `bonus_money` decimal(12,2) DEFAULT '0.00' COMMENT '每人可得分红金额,单位:元',
- `cycle_type` int(10) NOT NULL DEFAULT '0' COMMENT '分红周期[1=日,2=周,3=月]',
- `date` int(6) NOT NULL DEFAULT '0' COMMENT '执行日期,如:20220919',
- `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
- `created_at` int(10) DEFAULT '0' COMMENT '创建时间',
- `updated_at` int(10) DEFAULT '0' COMMENT '更新时间',
- PRIMARY KEY (`id`) USING BTREE,
- KEY `mall_level` (`mall_id`,`level`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='二二复制分红池发放记录';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M220920074446QimallAddonsDoubleCopyPoolSend cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220920074446QimallAddonsDoubleCopyPoolSend cannot be reverted.\n";
- return false;
- }
- */
- }
|