M240902092733InsertQimallAddonsStoreMenu.php 1.1 KB

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