| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace addons\DoubleCopy\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220920074430QimallAddonsDoubleCopyPoolLog
- */
- class M220920074430QimallAddonsDoubleCopyPoolLog extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "CREATE TABLE `qimall_addons_double_copy_pool_log` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `send_id` int(10) NOT NULL DEFAULT '0' COMMENT 'double_copy_pool_send.id',
- `mall_id` int(10) NOT NULL DEFAULT '0' COMMENT '商城ID',
- `user_id` int(10) NOT NULL DEFAULT '0' COMMENT '等级(权重)',
- `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 '可得分红金额,单位:元',
- `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 `send_id_user_id_level` (`send_id`,`user_id`,`level`) USING BTREE,
- KEY `mall_id` (`mall_id`) 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 "M220920074430QimallAddonsDoubleCopyPoolLog cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220920074430QimallAddonsDoubleCopyPoolLog cannot be reverted.\n";
- return false;
- }
- */
- }
|