Completed
Push — master ( 2289fe...fc9f33 )
by Scott
02:28
created

CreateCustomersTable::down()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php namespace Bedard\Shop\Updates;
2
3
use Schema;
4
use October\Rain\Database\Schema\Blueprint;
5
use October\Rain\Database\Updates\Migration;
6
7
class CreateCustomersTable extends Migration
8
{
9
    public function up()
10
    {
11
        Schema::create('bedard_shop_customers', function(Blueprint $table) {
12
            $table->engine = 'InnoDB';
13
            $table->increments('id');
14
            $table->string('name')->default('');
15
            $table->string('email')->default('');
16
            $table->integer('user_id')->unsigned()->index();
17
            $table->timestamps();
18
        });
19
    }
20
21
    public function down()
22
    {
23
        Schema::dropIfExists('bedard_shop_customers');
24
    }
25
}
26