| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M240606101037InsertQimallRbacAuthItem
- */
- class M240606101037InsertQimallRbacAuthItem extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- // 添加新记录到qimall_rbac_auth_item表
- $this->insert('qimall_rbac_auth_item', [
- 'name' => 'admin/role/del',
- 'title' => '删除',
- 'app_id' => 'backend',
- 'addons_name' => '',
- 'pid' => 2275,
- 'level' => 4,
- 'is_addon' => 0,
- 'sort' => 9999,
- 'tree' => 'tr_0 tr_2278 tr_2262 tr_2275 ',
- 'status' => 1,
- 'created_at' => time(),
- 'updated_at' => time(),
- 'cate_id' => 1,
- ]);
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- // 删除qimall_rbac_auth_item表中的新记录
- $this->delete('qimall_rbac_auth_item', ['name' => 'admin/role/del', 'title' => '删除']);
- }
- }
|