| @@ 16-21 (lines=6) @@ | ||
| 13 | */ |
|
| 14 | public function up() |
|
| 15 | { |
|
| 16 | Schema::create('regions', function (Blueprint $table) { |
|
| 17 | $table->increments('id'); |
|
| 18 | $table->string('code', 9)->unique(); |
|
| 19 | $table->string('name'); |
|
| 20 | $table->string('region_id', 2)->index(); |
|
| 21 | }); |
|
| 22 | ||
| 23 | Schema::create('provinces', function (Blueprint $table) { |
|
| 24 | $table->increments('id'); |
|
| @@ 23-29 (lines=7) @@ | ||
| 20 | $table->string('region_id', 2)->index(); |
|
| 21 | }); |
|
| 22 | ||
| 23 | Schema::create('provinces', function (Blueprint $table) { |
|
| 24 | $table->increments('id'); |
|
| 25 | $table->string('code', 9)->unique(); |
|
| 26 | $table->string('name'); |
|
| 27 | $table->string('region_id', 2)->index(); |
|
| 28 | $table->string('province_id', 4)->index(); |
|
| 29 | }); |
|
| 30 | ||
| 31 | Schema::create('cities', function (Blueprint $table) { |
|
| 32 | $table->increments('id'); |
|