| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- namespace addons\ServeBonus\console\migrations;
- use yii\db\Migration;
- /**
- * Class M241015075704AlterTableQimallAddonsServebonusLevelSetting
- */
- class M241015075704AlterTableQimallAddonsServebonusLevelSetting extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_servebonus_level_setting`
- ADD COLUMN `accumulation_condition` tinyint(1) NOT NULL DEFAULT 0 COMMENT '加权平均分限制条件,1开启,0关闭',
- ADD COLUMN `accumulation_condition_money` decimal(10, 2) NOT NULL DEFAULT 0 COMMENT '上月团队总业绩需达n元';";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M241015075704AlterTableQimallAddonsServebonusLevelSetting cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M241015075704AlterTableQimallAddonsServebonusLevelSetting cannot be reverted.\n";
- return false;
- }
- */
- }
|