M250312150617AlertAddonsCoupon.php 558 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace addons\Coupon\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Handles adding columns to table `{{%coupon}}`.
  6. */
  7. class M250312150617AlertAddonsCoupon extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. ALTER TABLE `qimall_addons_coupon`
  16. ADD COLUMN `applet_code` varchar(255) DEFAULT '' COMMENT '小程序二维码图片地址';
  17. SQL;
  18. $this->execute($sql);
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function safeDown()
  24. {
  25. return false;
  26. }
  27. }