CreateUpdatesTable::down()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
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 CreateUpdatesTable extends Migration
8
{
9
    /**
10
     * Run the migrations.
11
     */
12
    public function up()
13
    {
14
        Schema::create('updates', function (Blueprint $table) {
15
            $table->increments('id');
16
            $table->string('title');
17
            $table->string('version', 10);
18
            $table->string('type');
19
            $table->text('description');
20
            $table->integer('downloads');
21
            $table->timestamps();
22
        });
23
24
        Schema::create('customers', function (Blueprint $table) {
25
            $table->increments('id');
26
            $table->string('name');
27
            $table->string('purchaseKey');
28
            $table->timestamp('support_ends');
29
            $table->string('email')->unique();
30
            $table->timestamps();
31
        });
32
    }
33
34
    /**
35
     * Reverse the migrations.
36
     */
37
    public function down()
38
    {
39
        Schema::dropIfExists('customers');
40
        Schema::dropIfExists('updates');
41
    }
42
}
43