]> BookStack Code Mirror - bookstack/blob - database/migrations/2015_07_12_190027_create_pages_table.php
5e6e7e812ecd6486b739e23d7c74c9c8dd4fed9a
[bookstack] / database / migrations / 2015_07_12_190027_create_pages_table.php
1 <?php
2
3 use Illuminate\Database\Schema\Blueprint;
4 use Illuminate\Database\Migrations\Migration;
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->engine = 'MyISAM';
17             $table->increments('id');
18             $table->integer('book_id');
19             $table->integer('chapter_id');
20             $table->string('name');
21             $table->string('slug')->indexed();
22             $table->longText('html');
23             $table->longText('text');
24             $table->integer('priority');
25             $table->nullableTimestamps();
26         });
27     }
28
29     /**
30      * Reverse the migrations.
31      *
32      * @return void
33      */
34     public function down()
35     {
36         Schema::drop('pages');
37     }
38 }