CreateCloudStoragesTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
}