]> BookStack Code Mirror - bookstack/blob - database/migrations/2016_04_20_192649_create_entity_permissions_table.php
359f25df9313d5430483cee668234283cacc2b5c
[bookstack] / database / migrations / 2016_04_20_192649_create_entity_permissions_table.php
1 <?php
2
3 use Illuminate\Database\Schema\Blueprint;
4 use Illuminate\Database\Migrations\Migration;
5
6 class CreateEntityPermissionsTable extends Migration
7 {
8     /**
9      * Run the migrations.
10      *
11      * @return void
12      */
13     public function up()
14     {
15         Schema::create('entity_permissions', function (Blueprint $table) {
16             $table->increments('id');
17             $table->integer('role_id');
18             $table->string('entity_type');
19             $table->integer('entity_id');
20             $table->string('action');
21             $table->boolean('has_permission')->default(false);
22         });
23     }
24
25     /**
26      * Reverse the migrations.
27      *
28      * @return void
29      */
30     public function down()
31     {
32         Schema::drop('entity_permissions');
33     }
34 }