CreateSyncsTable::up()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 24
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 4
Bugs 0 Features 1
Metric Value
cc 1
eloc 14
c 4
b 0
f 1
nc 1
nop 0
dl 0
loc 24
rs 8.9713
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
}