| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- namespace addons\BossWeight\console\migrations;
- use yii\db\Migration;
- /**
- * Class M230809020723BossWeightAddColumn
- */
- class M230809020723BossWeightAddColumn extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = "ALTER TABLE `qimall_addons_boss_weight` ADD COLUMN `fixed_weight` int(11) NOT NULL DEFAULT 0 COMMENT '固定权重'";
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230809020723BossWeightAddColumn cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230809020723BossWeightAddColumn cannot be reverted.\n";
- return false;
- }
- */
- }
|