m220803_085248_insert_qimall_express.php 1013 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. *
  6. * Class m220803_085248_insert_qimall_express
  7. */
  8. class m220803_085248_insert_qimall_express extends Migration
  9. {
  10. /**
  11. * {@inheritdoc}
  12. */
  13. public function safeUp()
  14. {
  15. }
  16. /**
  17. * {@inheritdoc}
  18. */
  19. public function safeDown()
  20. {
  21. echo "m220803_085248_insert_qimall_express cannot be reverted.\n";
  22. return false;
  23. }
  24. // Use up()/down() to run migration code without a transaction.
  25. public function up()
  26. {
  27. try {
  28. $this->insert('qimall_express',[
  29. 'id'=>1024,
  30. 'name'=>'极兔快递',
  31. 'code'=>'JTSD',
  32. 'status'=>1,
  33. 'created_at'=>1631687277,
  34. 'updated_at'=>1631687277,
  35. ]);
  36. }catch (\Exception $e){
  37. }
  38. }
  39. public function down()
  40. {
  41. echo "m220803_085248_insert_qimall_express cannot be reverted.\n";
  42. return false;
  43. }
  44. }