CreateDatastorePagesTable::up()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 12
rs 10
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
/**
8
 * Migration auto-generated by Sequel Pro Laravel Export (1.5.0)
9
 * @see https://github.com/cviebrock/sequel-pro-laravel-export
10
 */
11
class CreateDatastorePagesTable extends Migration
12
{
13
    /**
14
     * Run the migrations.
15
     *
16
     * @return void
17
     */
18
    public function up()
19
    {
20
        Schema::create('datastore_pages', function (Blueprint $table) {
21
            $table->bigIncrements('id');
22
            $table->string('title', 255)->nullable();
23
            $table->string('slug', 255)->nullable();
24
            $table->unsignedBigInteger('asset')->nullable()->default(0);
25
26
27
28
            $table->foreign('asset', 'datastore_asset_foreign_key')->references('id')->on('datastore')->onDelete('RESTRICT
29
')->onUpdate('RESTRICT');
30
31
        });
32
33
34
35
    }
36
37
    /**
38
     * Reverse the migrations.
39
     *
40
     * @return void
41
     */
42
    public function down()
43
    {
44
        Schema::dropIfExists('datastore_pages');
45
    }
46
}
47