| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace addons\Community\console\migrations;
- use yii\db\Migration;
- /**
- * Class M240702013653AddEnableRefundField
- */
- class M240702013653AddEnableRefundField extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $addField = <<<SQL
- ALTER TABLE `qimall_addons_community_goods_setting`
- ADD COLUMN `enable_refund` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否开启自提退款【0关闭,1开启】';
- SQL;
- $this->execute($addField);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240702013653AddEnableRefundField cannot be reverted.\n";
- return false;
- }
- */
- }
|