]> BookStack Code Mirror - bookstack/blob - database/migrations/2015_07_12_190027_create_pages_table.php
Apply fixes from StyleCI
[bookstack] / database / migrations / 2015_07_12_190027_create_pages_table.php
1 <?php
2
3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5
6 class CreatePagesTable extends Migration
7 {
8     /**
9      * Run the migrations.
10      *
11      * @return void
12      */
13     public function up()
14     {
15         Schema::create('pages', function (Blueprint $table) {
16             $table->increments('id');
17             $table->integer('book_id');
18             $table->integer('chapter_id');
19             $table->string('name');
20             $table->string('slug')->indexed();
21             $table->longText('html');
22             $table->longText('text');
23             $table->integer('priority');
24             $table->nullableTimestamps();
25         });
26     }
27
28     /**
29      * Reverse the migrations.
30      *
31      * @return void
32      */
33     public function down()
34     {
35         Schema::drop('pages');
36     }
37 }