M240711070022AlertQimallRebate.php 845 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace addons\Rebate\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240711070022AlertQimallRebate
  6. */
  7. class M240711070022AlertQimallRebate extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. }
  15. /**
  16. * {@inheritdoc}
  17. */
  18. public function safeDown()
  19. {
  20. try {
  21. $sql="ALTER TABLE `qimall_addons_rebate` ADD COLUMN `is_grant` int(1) NULL DEFAULT 0 COMMENT '优惠/抵扣不发奖开关:1开启 0关闭';";
  22. $this->execute($sql);
  23. } catch (\Exception $e) {
  24. }
  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 "M240711070022AlertQimallRebate cannot be reverted.\n";
  34. return false;
  35. }
  36. */
  37. }