M240627065242InsertQimallAddonsStoreMenu.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240627065242InsertQimallAddonsStoreMenu
  6. */
  7. class M240627065242InsertQimallAddonsStoreMenu extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. // 添加新记录到qimall_addons_store_menu表
  15. $this->insert('qimall_addons_store_menu', [
  16. 'id' => 129,
  17. 'title' => '自定义规格',
  18. 'app_id' => '0',
  19. 'pid' => 2,
  20. 'addons_name' => '',
  21. 'is_addon' => 0,
  22. 'url' => 'store/client/specs/index',
  23. 'icon' => '',
  24. 'level' => 2,
  25. 'dev' => 0,
  26. 'sort' => 999,
  27. 'params' => null,
  28. 'tree' => '',
  29. 'status' => 1,
  30. 'created_at' => 0,
  31. 'updated_at' => 0,
  32. ]);
  33. }
  34. /**
  35. * {@inheritdoc}
  36. */
  37. public function safeDown()
  38. {
  39. // 删除qimall_addons_store_menu表中的新记录
  40. $this->delete('qimall_addons_store_menu', ['title' => '自定义规格', 'url' => 'store/client/specs/index']);
  41. }
  42. }