| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\Distribution\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240622101042AddColumnDistributionLevel
- */
- class M240622101042AddColumnDistributionLevel extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_distribution_level`
- ADD COLUMN `store_upgrade_type_goods` tinyint(1) NOT NULL DEFAULT '0' COMMENT '购买门店升级商品,0关闭,1开启',
- ADD COLUMN `store_buy_goods_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '门店订单完成0;支付完成:1',
- ADD COLUMN `store_goods_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '门店商品升级类型,1- 任意商品 2- 指定商品',
- ADD COLUMN `store_goods_ids` varchar(3000) NOT NULL DEFAULT '' COMMENT '门店商品id集合',
- ADD COLUMN `store_goods_list` text COMMENT '门店商品列表json';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240622101042AddColumnDistributionLevel cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240622101042AddColumnDistributionLevel cannot be reverted.\n";
- return false;
- }
- */
- }
|