Skip to content

Commit

Permalink
Fixed #7145 - rename groups table to permissions_group for mysql 8 re…
Browse files Browse the repository at this point in the history
…served word compatibility
  • Loading branch information
snipe committed Jun 12, 2019
1 parent cbff66c commit 1d0d25d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/Group.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Group extends SnipeModel
{
protected $table = 'groups';
protected $table = 'permission_groups';

public $rules = array(
'name' => 'required|min:3|max:255',
Expand Down
28 changes: 28 additions & 0 deletions database/migrations/2019_06_12_184327_rename_groups_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class RenameGroupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::rename('groups', 'permission_groups');
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::rename('permission_groups', 'groups');
}
}

0 comments on commit 1d0d25d

Please sign in to comment.