M250714175436AlterQimallAddonsStoreSupplier.php 948 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use addons\Store\common\services\StoreFinanceService;
  4. use common\enums\RabbitMqEnum;
  5. use yii\db\Migration;
  6. /**
  7. * Class M250714175436AlterQimallAddonsStoreSupplier
  8. */
  9. class M250714175436AlterQimallAddonsStoreSupplier extends Migration
  10. {
  11. /**
  12. * {@inheritdoc}
  13. */
  14. public function safeUp()
  15. {
  16. $sql = "update `qimall_addons_store_goods` set supplier_id = store_id where status = 1;";
  17. $this->execute($sql);
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function safeDown()
  23. {
  24. echo "M250714175436AlterQimallAddonsStoreSupplier 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 "M250703072236AlterQimallAddonsStoreCensus cannot be reverted.\n";
  35. return false;
  36. }
  37. */
  38. }