M250331141245CleanStoreMIniCode.php 631 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * 修改门店商品库存 有效距离和主商城相同
  6. * Class M250225103456AlertStoreGoodsReserve
  7. */
  8. class M250331141245CleanStoreMIniCode extends Migration
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function safeUp()
  14. {
  15. $sql = <<<SQL
  16. UPDATE qimall_addons_store_mini_code SET status = '-1' where type = 1;
  17. SQL;
  18. $this->execute($sql);
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function safeDown()
  24. {
  25. echo "M250331141245CleanStoreMIniCode cannot be reverted.\n";
  26. return false;
  27. }
  28. }