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