]> BookStack Code Mirror - bookstack/blob - database/migrations/2015_11_21_145609_create_views_table.php
Migrations: Updated with type hints instead of php doc
[bookstack] / database / migrations / 2015_11_21_145609_create_views_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 return new class extends Migration
8 {
9     /**
10      * Run the migrations.
11      */
12     public function up(): void
13     {
14         Schema::create('views', function (Blueprint $table) {
15             $table->increments('id');
16             $table->integer('user_id');
17             $table->integer('viewable_id');
18             $table->string('viewable_type');
19             $table->integer('views');
20             $table->nullableTimestamps();
21         });
22     }
23
24     /**
25      * Reverse the migrations.
26      */
27     public function down(): void
28     {
29         Schema::drop('views');
30     }
31 };