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