M240608115841AddExpressYUNDA.php 599 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace addons\QiJuhe\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240608115841AddExpressYUNDA
  6. */
  7. class M240608115841AddExpressYUNDA extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql = <<<SQL
  15. INSERT INTO `qimall_addons_qijuhe_express` (`express_id`, `name`, `code`) VALUES (3, '韵达', 'YUNDA');
  16. SQL;
  17. $this->execute($sql);
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function safeDown()
  23. {
  24. echo "M240608115841AddExpressYUNDA cannot be reverted.\n";
  25. return false;
  26. }
  27. }