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