]> BookStack Code Mirror - bookstack/blob - database/migrations/2016_03_13_082138_add_page_drafts.php
Followed Laravel 9 update steps and file changes
[bookstack] / database / migrations / 2016_03_13_082138_add_page_drafts.php
1 <?php
2
3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5
6 return new class extends Migration
7 {
8     /**
9      * Run the migrations.
10      *
11      * @return void
12      */
13     public function up()
14     {
15         Schema::table('pages', function (Blueprint $table) {
16             $table->boolean('draft')->default(false);
17             $table->index('draft');
18         });
19     }
20
21     /**
22      * Reverse the migrations.
23      *
24      * @return void
25      */
26     public function down()
27     {
28         Schema::table('pages', function (Blueprint $table) {
29             $table->dropColumn('draft');
30         });
31     }
32 };