]> BookStack Code Mirror - bookstack/blob - database/migrations/2016_02_25_184030_add_slug_to_revisions.php
0be6c794017422ff77e964143bb85a78f5de1d47
[bookstack] / database / migrations / 2016_02_25_184030_add_slug_to_revisions.php
1 <?php
2
3 use Illuminate\Database\Schema\Blueprint;
4 use Illuminate\Database\Migrations\Migration;
5
6 class AddSlugToRevisions 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 }