]> BookStack Code Mirror - bookstack/blob - database/migrations/2015_08_16_142133_create_activities_table.php
Followed Laravel 9 update steps and file changes
[bookstack] / database / migrations / 2015_08_16_142133_create_activities_table.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::create('activities', function (Blueprint $table) {
16             $table->increments('id');
17             $table->string('key');
18             $table->text('extra');
19             $table->integer('book_id')->indexed();
20             $table->integer('user_id');
21             $table->integer('entity_id');
22             $table->string('entity_type');
23             $table->nullableTimestamps();
24         });
25     }
26
27     /**
28      * Reverse the migrations.
29      *
30      * @return void
31      */
32     public function down()
33     {
34         Schema::drop('activities');
35     }
36 };