M240311102032DeleteScoreMallDiy.php 610 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240311102032DeleteScoreMallDiy
  6. */
  7. class M240311102032DeleteScoreMallDiy extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. try {
  15. $sql = "UPDATE `qimall_diy_components` SET `status` = -1 WHERE `code` = 'score-mall'";
  16. $this->execute($sql);
  17. } catch (\Exception $e) {
  18. }
  19. }
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function safeDown()
  24. {
  25. echo "M240311102032DeleteScoreMallDiy cannot be reverted.\n";
  26. return false;
  27. }
  28. }