M240625075222UpdateQimallAddonsSecondaryCardOrder.php 906 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace addons\SecondaryCard\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240625075222UpdateQimallAddonsSecondaryCardOrder
  6. */
  7. class M240625075222UpdateQimallAddonsSecondaryCardOrder extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $this->execute("UPDATE qimall_addons_secondary_card_order set start_time = open_time where start_time = 0 and open_type = 2");
  15. }
  16. /**
  17. * {@inheritdoc}
  18. */
  19. public function safeDown()
  20. {
  21. echo "M240625075222UpdateQimallAddonsSecondaryCardOrder cannot be reverted.\n";
  22. return false;
  23. }
  24. /*
  25. // Use up()/down() to run migration code without a transaction.
  26. public function up()
  27. {
  28. }
  29. public function down()
  30. {
  31. echo "M240625075222UpdateQimallAddonsSecondaryCardOrder cannot be reverted.\n";
  32. return false;
  33. }
  34. */
  35. }