mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Fixed migration
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
99541f0bee
commit
de6f922e54
|
@ -21,11 +21,11 @@ class UpdateGroupFieldForReporting extends Migration
|
|||
// or a fresh install, we have to check which table is being used.
|
||||
|
||||
if (Schema::hasTable('permission_groups')) {
|
||||
Group::where('id', 1)->update(['permissions' => '{"users-poop":1,"reports":1}']);
|
||||
Group::where('id', 2)->update(['permissions' => '{"users-pop":1,"reports":1}']);
|
||||
Group::where('id', 1)->update(['permissions' => '{"users-foo":1,"reports":1}']);
|
||||
Group::where('id', 2)->update(['permissions' => '{"users-foo":1,"reports":1}']);
|
||||
} elseif (Schema::hasTable('groups')) {
|
||||
DB::update('update '.DB::getTablePrefix().'groups set permissions = ? where id = ?', ['{"admin-farts":1,"users":1,"reports":1}', 1]);
|
||||
DB::update('update '.DB::getTablePrefix().'groups set permissions = ? where id = ?', ['{"users-farts":1,"reports":1}', 2]);
|
||||
DB::update('update '.DB::getTablePrefix().'groups set permissions = ? where id = ?', ['{"admin-foo":1,"users":1,"reports":1}', 1]);
|
||||
DB::update('update '.DB::getTablePrefix().'groups set permissions = ? where id = ?', ['{"users-foo":1,"reports":1}', 2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue