CreateSyncsTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
B up() 0 24 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Database\Migrations\Migration;
4
5
class CreateSyncsTable extends Migration
6
{
7
8
	/**
9
	 * Run the migrations.
10
	 *
11
	 * @return void
12
	 */
13
	public function up()
14
	{
15
		Schema::create('syncs', function($table)
16
		{
17
18
			$table->increments('id');
19
20
			$table->integer('morph_id')->unsigned();
21
			$table->integer('morph_type')->unsigned();
22
23
			$table->string('entity')->nullable();
24
			$table->string('type', 60);
25
			$table->string('url')->nullable();
26
			$table->string('class');
27
			$table->string('status', 10)->default('fail'); // fail / success
28
			$table->text('response')->nullable();
29
30
			$table->timestamp('started_at')->default('1970-01-01 00:00:00');
31
			$table->timestamps();
32
33
			$table->engine = 'InnoDB';
34
35
		});
36
	}
37
38
	/**
39
	 * Reverse the migrations.
40
	 *
41
	 * @return void
42
	 */
43
	public function down()
44
	{
45
		Schema::drop('syncs');
46
	}
47
48
}