| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * 修改素材管理菜单分类为商城
- * Class M250407172354UpdateRbacAuthItem
- */
- class M250407172354UpdateRbacAuthItem extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = <<<SQL
- UPDATE `qimall_rbac_auth_item` SET `cate_id` = 2 WHERE `pid` = 2817 and `name` = 'mall/attachment/index' and `app_id` = 'backend';
- SQL;
- $this->execute($sql);
- } catch (\Exception $e) {
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M250407172354UpdateRbacAuthItem cannot be reverted.\n";
- return false;
- }
- }
|