| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace addons\WriteOff\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230922112750WriteOffUpdate
- */
- class M230922112750WriteOffUpdate extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_write_off_member_log` ADD COLUMN `code` int(8) NOT NULL DEFAULT 0 COMMENT '核销码';";
- $this->execute($sql);
-
- $sql = "ALTER TABLE `qimall_addons_write_off_level`
- ADD COLUMN `is_enable_promote_limit` tinyint(4) NULL DEFAULT 0 COMMENT '核销限制[0:关闭;1启用]',
- ADD COLUMN `promote_time` int(10) NULL DEFAULT 0 COMMENT '每日核销次数';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230922112750WriteOffUpdate cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230922112750WriteOffUpdate cannot be reverted.\n";
- return false;
- }
- */
- }
|