| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace addons\Boss\console\migrations;
- use yii\db\Migration;
- /**
- * 股东分佣设置表 添加股东分红限制字段
- * Class M240718112745CreateBonusRestrictBossLevelSetting
- */
- class M240718112745CreateBonusRestrictBossLevelSetting extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- ALTER TABLE `qimall_addons_boss_level_setting`
- ADD COLUMN `bonus_restrict` tinyint(1) COMMENT '股东分红限制[0=关闭, 1=开启]' AFTER `extra_restrict_values`,
- ADD COLUMN `bonus_restrict_keys` varchar(255) COMMENT '股东分红限制条件key合集' AFTER `bonus_restrict`,
- ADD COLUMN `bonus_restrict_values` text COMMENT '股东分红限制条件值合集' AFTER `bonus_restrict_keys`;
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M240718112745CreateBonusRestrictBossLevelSetting cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M240718112745CreateBonusRestrictBossLevelSetting cannot be reverted.\n";
- return false;
- }
- */
- }
|