From 4a5b84d2e721631ca698f621dfc3776e36385ae2 Mon Sep 17 00:00:00 2001 From: Ian Morland Date: Sat, 26 Jun 2021 07:19:27 +0100 Subject: [PATCH] Remove `LIKE` and raw from viewUserList rename --- migrations/2021_05_10_000000_rename_permissions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migrations/2021_05_10_000000_rename_permissions.php b/migrations/2021_05_10_000000_rename_permissions.php index 367c2d6c3..81bc8a348 100644 --- a/migrations/2021_05_10_000000_rename_permissions.php +++ b/migrations/2021_05_10_000000_rename_permissions.php @@ -18,8 +18,8 @@ return [ ->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) { @@ -30,7 +30,7 @@ return [ ->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']); } ];