mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-07-17 16:52:24 +00:00
35 lines
769 B
PHP
35 lines
769 B
PHP
![]() |
<?php
|
||
|
|
||
|
use Illuminate\Database\Schema\Blueprint;
|
||
|
use Illuminate\Database\Migrations\Migration;
|
||
|
|
||
|
class CreateEntityPermissionsTable extends Migration
|
||
|
{
|
||
|
/**
|
||
|
* Run the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function up()
|
||
|
{
|
||
|
Schema::create('entity_permissions', function (Blueprint $table) {
|
||
|
$table->increments('id');
|
||
|
$table->integer('role_id');
|
||
|
$table->string('entity_type');
|
||
|
$table->integer('entity_id');
|
||
|
$table->string('action');
|
||
|
$table->boolean('has_permission')->default(false);
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*
|
||
|
* @return void
|
||
|
*/
|
||
|
public function down()
|
||
|
{
|
||
|
Schema::drop('entity_permissions');
|
||
|
}
|
||
|
}
|