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