| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M250224143245AlterQimallGoodsExtra
- */
- class M250224143245AlterQimallGoodsExtra extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_goods_extra`
- ADD COLUMN `is_alone_show_return_btn` TINYINT(1) NULL DEFAULT 0 COMMENT '设置独立放弃退换货,0:否,1:是',
- ADD COLUMN `is_show_return_btn` TINYINT(1) NULL DEFAULT 1 COMMENT '是否显示放弃退换货按钮,0:否,1:是';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250224143245AlterQimallGoodsExtra cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M250224143245AlterQimallGoodsExtra cannot be reverted.\n";
- return false;
- }
- */
- }
|