M230407031049InsertScoreExpansionGoodsSetting.php 974 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace addons\ScoreExpansion\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M230407031049InsertScoreExpansionGoodsSetting
  6. */
  7. class M230407031049InsertScoreExpansionGoodsSetting extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = "ALTER TABLE `qimall_addons_score_expansion_goods_setting` ADD COLUMN `parent` tinyint(2) NULL DEFAULT 0 COMMENT '是否是直推上级的设置 1是 0 否' AFTER `status`";
  15. $this->execute($sql);
  16. }
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function safeDown()
  21. {
  22. echo "M230407031049InsertScoreExpansionGoodsSetting cannot be reverted.\n";
  23. return false;
  24. }
  25. /*
  26. // Use up()/down() to run migration code without a transaction.
  27. public function up()
  28. {
  29. }
  30. public function down()
  31. {
  32. echo "M230407031049InsertScoreExpansionGoodsSetting cannot be reverted.\n";
  33. return false;
  34. }
  35. */
  36. }