| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('tm_states', function (Blueprint $table) { |
||
| 17 | $table->bigIncrements('id'); |
||
| 18 | $table->unsignedBigInteger('country_id'); |
||
| 19 | $table->string('name', 255); |
||
| 20 | $table->string('region', 255)->nullable(); |
||
| 21 | $table->string('iso_3166_2', 2)->nullable(); |
||
| 22 | $table->string('region_code', 10)->nullable(); |
||
| 23 | $table->string('calling_code', 5)->nullable(); |
||
| 24 | $table->string('latitude')->nullable(); |
||
| 25 | $table->string('longitude')->nullable(); |
||
| 26 | $table->boolean('active')->default(1); |
||
| 27 | $table->timestamps(); |
||
| 28 | }); |
||
| 29 | |||
| 30 | Schema::table('tm_states', function (Blueprint $table) { |
||
| 31 | $table->foreign('country_id') |
||
| 32 | ->references('id')->on('tm_countries') |
||
| 33 | ->onDelete('cascade'); |
||
| 34 | }); |
||
| 47 |