| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class CreateAddressesTable extends Migration |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Run the migrations. |
||
| 11 | */ |
||
| 12 | public function up() |
||
| 13 | { |
||
| 14 | Schema::create('addresses', function (Blueprint $table) { |
||
| 15 | $table->increments('id'); |
||
| 16 | $table->hashslug(); |
||
| 17 | $table->nullableBelongsTo('countries'); |
||
| 18 | $table->unsignedInteger('addressable_id'); |
||
| 19 | $table->string('addressable_type'); |
||
| 20 | $table->text('primary')->nullable(); |
||
| 21 | $table->text('secondary')->nullable(); |
||
| 22 | $table->string('postcode')->nullable(); |
||
| 23 | $table->string('city')->nullable(); |
||
| 24 | $table->string('state')->nullable(); |
||
| 25 | $table->is('default'); |
||
| 26 | $table->standardTime(); |
||
| 27 | }); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Reverse the migrations. |
||
| 32 | */ |
||
| 33 | public function down() |
||
| 36 | } |
||
| 37 | } |
||
| 38 |