Remove LIKE and raw from viewUserList rename

This commit is contained in:
Ian Morland 2021-06-26 07:19:27 +01:00 committed by Daniël Klabbers
parent 557fc2cd39
commit 4a5b84d2e7

View File

@ -18,8 +18,8 @@ return [
->update(['permission' => $db->raw("REPLACE(permission, 'viewDiscussions', 'viewForum')")]); ->update(['permission' => $db->raw("REPLACE(permission, 'viewDiscussions', 'viewForum')")]);
$db->table('group_permission') $db->table('group_permission')
->where('permission', 'LIKE', 'viewUserList') ->where('permission', 'viewUserList')
->update(['permission' => $db->raw("REPLACE(permission, 'viewUserList', 'searchUsers')")]); ->update(['permission' => 'searchUsers']);
}, },
'down' => function (Builder $schema) { 'down' => function (Builder $schema) {
@ -30,7 +30,7 @@ return [
->update(['permission' => $db->raw("REPLACE(permission, 'viewForum', 'viewDiscussions')")]); ->update(['permission' => $db->raw("REPLACE(permission, 'viewForum', 'viewDiscussions')")]);
$db->table('group_permission') $db->table('group_permission')
->where('permission', 'LIKE', 'searchUsers') ->where('permission', 'searchUsers')
->update(['permission' => $db->raw("REPLACE(permission, 'searchUsers', 'viewUserList')")]); ->update(['permission' => 'viewUserList']);
} }
]; ];