M240929014217InsertQimallStoreMenu.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240929014217InsertQimallStoreMenu
  6. */
  7. class M240929014217InsertQimallStoreMenu extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql= "
  15. INSERT INTO `qimall_addons_store_menu` (`title`, `app_id`, `pid`, `addons_name`, `is_addon`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES ( '预约看板', '0', 42, '', 0, 'store/client/reserve-board/index', '', 2, 0, 999, NULL, '', 1, 0, 0);
  16. INSERT INTO `qimall_addons_store_menu` (`title`, `app_id`, `pid`, `addons_name`, `is_addon`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES ( '预约设置', '0', 42, '', 0, 'store/client/reserve-setting/index', '', 2, 0, 999, NULL, '', 1, 0, 0);
  17. INSERT INTO `qimall_addons_store_menu` (`title`, `app_id`, `pid`, `addons_name`, `is_addon`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES ( '排班管理', '0', 42, '', 0, 'store/client/reserve-staff/scheduling', '', 2, 0, 999, NULL, '', 1, 0, 0);
  18. ";
  19. $this->execute($sql);
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. public function safeDown()
  25. {
  26. echo "M240929014217InsertQimallStoreMenu cannot be reverted.\n";
  27. return false;
  28. }
  29. /*
  30. // Use up()/down() to run migration code without a transaction.
  31. public function up()
  32. {
  33. }
  34. public function down()
  35. {
  36. echo "M240929014217InsertQimallStoreMenu cannot be reverted.\n";
  37. return false;
  38. }
  39. */
  40. }