| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * Class M250729084413AlterQimallAddonsStoreGoodsExtra
- */
- class M250729084413AlterQimallAddonsStoreGoodsExtra extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_store_goods_extra`
- ADD COLUMN `member_price_switch` tinyint(1) DEFAULT 0 COMMENT '是否单独设置会员价',
- ADD COLUMN `is_show_price` tinyint(1) DEFAULT 0 COMMENT '商品详情是否显示会员价';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250729084413AlterQimallAddonsStoreGoodsExtra cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250729084413AlterQimallAddonsStoreGoodsExtra cannot be reverted.\n";
- return false;
- }
- */
- }
|