mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 06:17:28 -08:00
Fixed #7145 - rename groups table to permissions_group for mysql 8 reserved word compatibility
This commit is contained in:
parent
cbff66c9db
commit
1d0d25db37
|
@ -7,7 +7,7 @@ use Watson\Validating\ValidatingTrait;
|
|||
|
||||
class Group extends SnipeModel
|
||||
{
|
||||
protected $table = 'groups';
|
||||
protected $table = 'permission_groups';
|
||||
|
||||
public $rules = array(
|
||||
'name' => 'required|min:3|max:255',
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue