CreateCloudStoragesTable   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 40
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 26 1
A down() 0 4 1
1
<?php
2
3
use Illuminate\Support\Facades\Schema;
4
use Illuminate\Database\Schema\Blueprint;
5
use Illuminate\Database\Migrations\Migration;
6
7
class CreateCloudStoragesTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     */
12
    public function up()
13
    {
14
        Schema::create('cloud_storages', function (Blueprint $table) {
15
            $table->increments('id');
16
            $table->morphs('owner');
17
            $table->string('driver');
18
            $table->text('token')->nullable();
19
20
            $table->string('name')->nullable();
21
            $table->string('email')->nullable();
22
23
            $table->boolean('connected')->default(0);
24
            $table->boolean('enabled')->default(0);
25
            $table->boolean('full')->default(0);
26
            $table->string('reason')->nullable();
27
28
            $table->bigInteger('total_space')->nullable();
29
            $table->bigInteger('space_used')->nullable();
30
            $table->bigInteger('space_available')->nullable();
31
            $table->float('percent_full', 4)->default(0);
32
33
            $table->timestamp('space_checked_at')->nullable();
34
            $table->timestamp('uploaded_at')->nullable();
35
            $table->timestamps();
36
        });
37
    }
38
39
    /**
40
     * Reverse the migrations.
41
     */
42
    public function down()
43
    {
44
        Schema::dropIfExists('cloud_storages');
45
    }
46
}