| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\migrations;
- use yii\db\Migration;
- /**
- * Class M230321141725InsertQimallRbacAuthItem
- */
- class M230321141725InsertQimallRbacAuthItem extends Migration
- {
- /**
- * {@inheritdoc}
- */
- public function safeUp()
- {
- try {
- $sql = "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 ";
- $sql.= "('mall/user/add-user-label', '加标签', 'backend', '', 2940, 3, 0, 999, 'tr_0 tr_2820 tr_2940', 1, 1647337775, 1647338010, 2),";
- $sql.= "('mall/user/commission', '佣金充值', 'backend', '', 2940, 3, 0, 999, 'tr_0 tr_2820 tr_2940', 1, 1647337775, 1647338010, 2);";
- $this->execute($sql);
- }catch (\Exception $e){
- }
- }
- /**
- * {@inheritdoc}
- */
- public function safeDown()
- {
- echo "M230321141725InsertQimallRbacAuthItem cannot be reverted.\n";
- return false;
- }
- /*
- // Use up()/down() to run migration code without a transaction.
- public function up()
- {
- }
- public function down()
- {
- echo "M230321141725InsertQimallRbacAuthItem cannot be reverted.\n";
- return false;
- }
- */
- }
|