]> BookStack Code Mirror - bookstack/blob - database/migrations/2015_11_21_145609_create_views_table.php
Resolves book heading issues in grid view.
[bookstack] / database / migrations / 2015_11_21_145609_create_views_table.php
1 <?php
2
3 use Illuminate\Database\Schema\Blueprint;
4 use Illuminate\Database\Migrations\Migration;
5
6 class CreateViewsTable extends Migration
7 {
8     /**
9      * Run the migrations.
10      *
11      * @return void
12      */
13     public function up()
14     {
15         Schema::create('views', function (Blueprint $table) {
16             $table->increments('id');
17             $table->integer('user_id');
18             $table->integer('viewable_id');
19             $table->string('viewable_type');
20             $table->integer('views');
21             $table->nullableTimestamps();
22         });
23     }
24
25     /**
26      * Reverse the migrations.
27      *
28      * @return void
29      */
30     public function down()
31     {
32         Schema::drop('views');
33     }
34 }