| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | return new class extends Migration |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Run the migrations. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('families', function (Blueprint $table) { |
||
| 17 | $table->increments('id'); |
||
| 18 | $table->text('description')->nullable(); |
||
| 19 | $table->integer('is_active')->nullable(); |
||
| 20 | $table->integer('type_id')->nullable(); |
||
| 21 | $table->integer('husband_id')->references('id')->on('persons')->nullable(); |
||
| 22 | $table->integer('wife_id')->references('id')->on('persons')->nullable(); |
||
| 23 | $table->timestamps(); |
||
| 24 | $table->softDeletes(); |
||
| 25 | }); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Reverse the migrations. |
||
| 30 | * |
||
| 31 | * @return void |
||
| 32 | */ |
||
| 33 | public function down() |
||
| 34 | { |
||
| 35 | Schema::dropIfExists('families'); |
||
| 36 | } |
||
| 38 |