| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace addons\DoubleCopy\console\migrations;
- use yii\db\Migration;
- /**
- * Class M220920074501QimallAddonsDoubleCopyPoolSource
- */
- class M220920074501QimallAddonsDoubleCopyPoolSource extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "CREATE TABLE `qimall_addons_double_copy_pool_source` (
- `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 '等级(权重)',
- `order_detail_id` int(10) NOT NULL DEFAULT '0' COMMENT '订单详情ID',
- `money` decimal(12,2) NOT NULL 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 `mall_id_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 "M220920074501QimallAddonsDoubleCopyPoolSource cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M220920074501QimallAddonsDoubleCopyPoolSource cannot be reverted.\n";
- return false;
- }
- */
- }
|