]> BookStack Code Mirror - bookstack/blob - database/migrations/2016_02_25_184030_add_slug_to_revisions.php
a083e10b58008e971b12ce1d60c834b269ae7563
[bookstack] / database / migrations / 2016_02_25_184030_add_slug_to_revisions.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('page_revisions', function (Blueprint $table) {
16             $table->string('slug');
17             $table->index('slug');
18             $table->string('book_slug');
19             $table->index('book_slug');
20         });
21     }
22
23     /**
24      * Reverse the migrations.
25      *
26      * @return void
27      */
28     public function down()
29     {
30         Schema::table('page_revisions', function (Blueprint $table) {
31             $table->dropColumn('slug');
32             $table->dropColumn('book_slug');
33         });
34     }
35 };