CreateAdConfigurationsTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Support\Facades\Schema;
6
7
class CreateAdConfigurationsTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     *
12
     * @return void
13
     */
14
    public function up()
15
    {
16
        Schema::create(config('nova-ad-director.tables.ad_configurations'),
17
            function (Blueprint $table) {
18
                $table->id();
19
                $table->string('key', 255)->index();
20
                $table->string('location', 150)->index();
21
                $table->string('status', 50)->default('disabled')->index();
22
                $table->json('configuration')->nullable();
23
                $table->timestamps();
24
25
                $table->unique(['key', 'location']);
26
            });
27
    }
28
29
    /**
30
     * Reverse the migrations.
31
     *
32
     * @return void
33
     */
34
    public function down()
35
    {
36
        Schema::dropIfExists(config('nova-ad-director.tables.ad_configurations'));
37
    }
38
}
39