| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230427175435InsertQimallMenu
- */
- class M230427175435InsertQimallMenu extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql="INSERT INTO `qimall_menu`(`title`, `app_id`, `cate_id`, `addons_name`, `is_addon`, `pid`, `url`, `icon`, `level`, `dev`, `sort`, `params`, `tree`, `status`, `created_at`, `updated_at`) VALUES ('回收站', 'backend', 1, '', 0, 5, 'admin/mall/recovery', '', 2, 1, 999, NULL, 'tr_0 tr_5', 1, 1682578853, 1682578853);
- INSERT INTO `qimall_rbac_auth_item`(`name`, `title`, `app_id`, `addons_name`, `pid`, `level`, `is_addon`, `sort`, `tree`, `status`, `created_at`, `updated_at`, `cate_id`) VALUES ('admin/mall/recovery', '回收站', 'backend', '', 2266, 3, 0, 999, 'tr_0 tr_2278 tr_2266 ', 1, 1682578853, 1682578853, 1);";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230427175435InsertQimallMenu cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230427175435InsertQimallMenu cannot be reverted.\n";
- return false;
- }
- */
- }
|