m220803_08578_insert_qimall_menu_11_19.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace app\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class m220803_085248_insert_qimall_express
  6. */
  7. class m220803_08578_insert_qimall_menu_11_19 extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. }
  15. /**
  16. * {@inheritdoc}
  17. */
  18. public function safeDown()
  19. {
  20. echo "m220803_08578_insert_qimall_menu_11_19 cannot be reverted.\n";
  21. return false;
  22. }
  23. // Use up()/down() to run migration code without a transaction.
  24. public function up()
  25. {
  26. try {
  27. $this->insert('qimall_menu',[
  28. 'title'=>'关注回复',
  29. 'app_id'=>'backend',
  30. 'cate_id'=>'2',
  31. 'addons_name'=>'',
  32. 'is_addon'=>'0',
  33. 'pid'=>'77',
  34. 'url'=>'mall/wechat/follow-reply-rule',
  35. 'icon'=>'',
  36. 'level'=>'3',
  37. 'dev'=>'3',
  38. 'sort'=>'99',
  39. 'params'=>'',
  40. 'tree'=>'tr_39 tr_77',
  41. 'status'=>'1',
  42. 'created_at'=>1631687277,
  43. 'updated_at'=>1631687277,
  44. ]);
  45. }catch (\Exception $e){
  46. }
  47. }
  48. public function down()
  49. {
  50. echo "m220803_08578_insert_qimall_menu_11_19 cannot be reverted.\n";
  51. return false;
  52. }
  53. }