M240902015348AlterQimallAddonsStore.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240902015348AlterQimallAddonsStore
  6. */
  7. class M240902015348AlterQimallAddonsStore extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql="ALTER table qimall_addons_store add is_show_wechat_video_number tinyint(1) not null default 0 comment '是否显示微信视频号:0否;1是';
  15. ALTER table qimall_addons_store add wechat_video_number_id varchar(255) not null default '' comment '微信视频号id';
  16. ALTER table qimall_addons_store add is_show_coupon tinyint(1) not null default 1 comment '是否显示优惠券:0否;1是';";
  17. $this->execute($sql);
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function safeDown()
  23. {
  24. echo "M240902015348AlterQimallAddonsStore cannot be reverted.\n";
  25. return false;
  26. }
  27. /*
  28. // Use up()/down() to run migration code without a transaction.
  29. public function up()
  30. {
  31. }
  32. public function down()
  33. {
  34. echo "M240902015348AlterQimallAddonsStore cannot be reverted.\n";
  35. return false;
  36. }
  37. */
  38. }