Skip to content

Commit

Permalink
Remove LIKE and raw from viewUserList rename
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland authored and luceos committed Jun 28, 2021
1 parent 557fc2c commit 4a5b84d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions migrations/2021_05_10_000000_rename_permissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
->update(['permission' => $db->raw("REPLACE(permission, 'viewDiscussions', 'viewForum')")]);

$db->table('group_permission')
->where('permission', 'LIKE', 'viewUserList')
->update(['permission' => $db->raw("REPLACE(permission, 'viewUserList', 'searchUsers')")]);
->where('permission', 'viewUserList')
->update(['permission' => 'searchUsers']);
},

'down' => function (Builder $schema) {
Expand All @@ -30,7 +30,7 @@
->update(['permission' => $db->raw("REPLACE(permission, 'viewForum', 'viewDiscussions')")]);

$db->table('group_permission')
->where('permission', 'LIKE', 'searchUsers')
->update(['permission' => $db->raw("REPLACE(permission, 'searchUsers', 'viewUserList')")]);
->where('permission', 'searchUsers')
->update(['permission' => 'viewUserList']);
}
];

0 comments on commit 4a5b84d

Please sign in to comment.