]> BookStack Code Mirror - bookstack/blob - database/migrations/2020_09_27_210528_create_deletions_table.php
New translations entities.php (Norwegian Bokmal)
[bookstack] / database / migrations / 2020_09_27_210528_create_deletions_table.php
1 <?php
2
3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema;
6
7 class CreateDeletionsTable extends Migration
8 {
9     /**
10      * Run the migrations.
11      *
12      * @return void
13      */
14     public function up()
15     {
16         Schema::create('deletions', function (Blueprint $table) {
17             $table->increments('id');
18             $table->integer('deleted_by');
19             $table->string('deletable_type', 100);
20             $table->integer('deletable_id');
21             $table->timestamps();
22
23             $table->index('deleted_by');
24             $table->index('deletable_type');
25             $table->index('deletable_id');
26         });
27     }
28
29     /**
30      * Reverse the migrations.
31      *
32      * @return void
33      */
34     public function down()
35     {
36         Schema::dropIfExists('deletions');
37     }
38 }