CreateHooksTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 6
Bugs 0 Features 1
Metric Value
wmc 2
c 6
b 0
f 1
lcom 0
cbo 0
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 16 1
A down() 0 4 1
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