Total Complexity | 2 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class CreateBanksTable extends Migration |
||
8 | { |
||
9 | /** |
||
10 | * Run the migrations. |
||
11 | */ |
||
12 | public function up() |
||
13 | { |
||
14 | Schema::create('banks', function (Blueprint $table) { |
||
15 | $table->increments('id'); |
||
16 | $table->string('name')->nullable(); |
||
17 | $table->code('swift_code'); |
||
18 | $table->code('bank_code'); |
||
19 | $table->standardTime(); |
||
20 | }); |
||
21 | |||
22 | Schema::create('bank_accounts', function (Blueprint $table) { |
||
23 | $table->increments('id'); |
||
24 | $table->hashslug(); |
||
25 | $table->belongsTo('banks'); |
||
26 | $table->unsignedInteger('bankable_id'); |
||
27 | $table->string('bankable_type'); |
||
28 | $table->string('account_no')->nullable(); |
||
29 | $table->is('default'); |
||
30 | $table->standardTime(); |
||
31 | }); |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Reverse the migrations. |
||
36 | */ |
||
37 | public function down() |
||
41 | } |
||
42 | } |
||
43 |