M250618020703InsertQimallAddonsBossLevelSetting.php 983 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace addons\Boss\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M250618020703InsertQimallAddonsBossLevelSetting
  6. */
  7. class M250618020703InsertQimallAddonsBossLevelSetting extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = "ALTER TABLE `qimall_addons_boss_level_setting`
  15. ADD COLUMN `is_static_extra` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否计算已满上限(1:计算,2:不计算)';";
  16. $this->execute($sql);
  17. }
  18. /**
  19. * {@inheritdoc}
  20. */
  21. public function safeDown()
  22. {
  23. echo "M250618020703InsertQimallAddonsBossLevelSetting cannot be reverted.\n";
  24. return false;
  25. }
  26. /*
  27. // Use up()/down() to run migration code without a transaction.
  28. public function up()
  29. {
  30. }
  31. public function down()
  32. {
  33. echo "M250618020703InsertQimallAddonsBossLevelSetting cannot be reverted.\n";
  34. return false;
  35. }
  36. */
  37. }