mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -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
|
class Group extends SnipeModel
|
||||||
{
|
{
|
||||||
protected $table = 'groups';
|
protected $table = 'permission_groups';
|
||||||
|
|
||||||
public $rules = array(
|
public $rules = array(
|
||||||
'name' => 'required|min:3|max:255',
|
'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