| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace addons\Store\console\migrations;
- use yii\db\Migration;
- /**
- * 修改门店商品库存 有效距离和主商城相同
- * Class M250225103456AlertStoreGoodsReserve
- */
- class M250225103456AlertStoreGoodsReserve extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- $sql = <<<SQL
- ALTER TABLE `qimall_addons_store_goods_reserve`
- MODIFY COLUMN `distance` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '有效距离' AFTER `reserve_type`;
- SQL;
- $this->execute($sql);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250225103456AlertStoreGoodsReserve cannot be reverted.\n";
- return false;
- }
-
- }
|