| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace addons\Distribution\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230614014107AokalanV3
- */
- class M230614014107AokalanV3 extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $this->execute("CREATE TABLE `qimall_addons_distribution_goods_repurchase` (
- `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
- `mall_id` INT(10) NOT NULL DEFAULT '0' COMMENT '商城ID',
- `item_id` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '商品id',
- `status` TINYINT(4) NULL DEFAULT '1' COMMENT '状态[-1:删除;0:禁用;1启用]',
- `created_at` INT(10) UNSIGNED NOT NULL DEFAULT '0',
- `updated_at` INT(10) UNSIGNED NOT NULL DEFAULT '0',
- PRIMARY KEY (`id`) USING BTREE,
- INDEX `item_id` (`item_id`) USING BTREE
- )
- COMMENT='复购等于报单'
- COLLATE='utf8mb4_general_ci'
- ENGINE=InnoDB;");
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230614014107AokalanV3 cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230614014107AokalanV3 cannot be reverted.\n";
- return false;
- }
- */
- }
|