]> BookStack Code Mirror - bookstack/blob - database/migrations/2016_03_25_123157_add_markdown_support.php
a89fc273d7840dda4045cb29ff7d7451fe00207d
[bookstack] / database / migrations / 2016_03_25_123157_add_markdown_support.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->longText('markdown')->default('');
17         });
18
19         Schema::table('page_revisions', function (Blueprint $table) {
20             $table->longText('markdown')->default('');
21         });
22     }
23
24     /**
25      * Reverse the migrations.
26      *
27      * @return void
28      */
29     public function down()
30     {
31         Schema::table('pages', function (Blueprint $table) {
32             $table->dropColumn('markdown');
33         });
34
35         Schema::table('page_revisions', function (Blueprint $table) {
36             $table->dropColumn('markdown');
37         });
38     }
39 };