]> BookStack Code Mirror - bookstack/blob - database/migrations/2015_07_12_190027_create_pages_table.php
Opensearch: Fixed XML declaration when php short tags enabled
[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 use Illuminate\Support\Facades\Schema;
6
7 return new class extends Migration
8 {
9     /**
10      * Run the migrations.
11      */
12     public function up(): void
13     {
14         Schema::create('pages', function (Blueprint $table) {
15             $table->increments('id');
16             $table->integer('book_id');
17             $table->integer('chapter_id');
18             $table->string('name');
19             $table->string('slug')->indexed();
20             $table->longText('html');
21             $table->longText('text');
22             $table->integer('priority');
23             $table->nullableTimestamps();
24         });
25     }
26
27     /**
28      * Reverse the migrations.
29      */
30     public function down(): void
31     {
32         Schema::drop('pages');
33     }
34 };