M240915082731InsertQimallAddonsStoreMenu.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace addons\Store\console\migrations;
  3. use yii\db\Migration;
  4. /**
  5. * Class M240915082731InsertQimallAddonsStoreMenu
  6. */
  7. class M240915082731InsertQimallAddonsStoreMenu extends Migration
  8. {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. public function safeUp()
  13. {
  14. $sql="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', 102, 'Coupon', 1, 'store/client/coupon/setting', '', 2, 0, 999, NULL, '', 1, 0, 0);";
  15. $this->execute($sql);
  16. }
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function safeDown()
  21. {
  22. echo "M240915082731InsertQimallAddonsStoreMenu cannot be reverted.\n";
  23. return false;
  24. }
  25. /*
  26. // Use up()/down() to run migration code without a transaction.
  27. public function up()
  28. {
  29. }
  30. public function down()
  31. {
  32. echo "M240915082731InsertQimallAddonsStoreMenu cannot be reverted.\n";
  33. return false;
  34. }
  35. */
  36. }