CreateHooksTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Bedard\Webhooks\Updates;
2
3
use Schema;
4
use October\Rain\Database\Updates\Migration;
5
6
class CreateHooksTable extends Migration
7
{
8
9
    public function up()
10
    {
11
        Schema::create('bedard_webhooks_hooks', function($table)
12
        {
13
            $table->engine = 'InnoDB';
14
            $table->increments('id');
15
            $table->boolean('is_enabled')->default(true);
16
            $table->string('token', 40)->unique();
17
            $table->string('name')->nullable();
18
            $table->text('script')->nullable();
19
            $table->string('http_method', 10)->nullable();
20
            $table->string('executed_by')->nullable();
21
            $table->datetime('executed_at')->nullable();
22
            $table->timestamps();
23
        });
24
    }
25
26
    public function down()
27
    {
28
        Schema::dropIfExists('bedard_webhooks_hooks');
29
    }
30
31
}
32