M250324140855AddAddonsStoreLimitDistance.php 654 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M250108104255AddMallAttrIdToStoreGoodsAttr
  6. */
  7. class M250324140855AddAddonsStoreLimitDistance extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. ALTER TABLE `qimall_addons_store` ADD COLUMN `limit_distance` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '匹配距离限制';
  16. SQL;
  17. $this->execute($sql);
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function safeDown()
  23. {
  24. echo "M250324140855AddAddonsStoreLimitDistance cannot be reverted.\n";
  25. return false;
  26. }
  27. }