| Conditions | 3 |
| Paths | 4 |
| Total Lines | 28 |
| Code Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | if (!Schema::hasTable('med_form_field_val_tab')) { |
||
| 17 | Schema::create('med_form_field_val_tab', function (Blueprint $table) { |
||
| 18 | $table->id(); |
||
| 19 | $table->unsignedBigInteger('form_field_id')->nullable(); |
||
| 20 | $table->foreign('form_field_id') |
||
| 21 | ->references('id') |
||
| 22 | ->on('med_form_fields') |
||
| 23 | ->onDelete('set null'); |
||
| 24 | $table->string('table_name'); |
||
| 25 | $table->timestamps(); |
||
| 26 | }); |
||
| 27 | } |
||
| 28 | |||
| 29 | if (!Schema::hasTable('med_form_field_val_tab_translations')) { |
||
| 30 | Schema::create('med_form_field_val_tab_translations', function (Blueprint $table) { |
||
| 31 | $table->id(); |
||
| 32 | $table->string('value'); |
||
| 33 | $table->text('text')->nullable(); |
||
| 34 | $table->unsignedBigInteger('val_tab_id')->nullable(); |
||
| 35 | $table->foreign('val_tab_id') |
||
| 36 | ->references('id') |
||
| 37 | ->on('med_form_field_val_tab') |
||
| 38 | ->onDelete('set null'); |
||
| 39 | $table->string('locale')->nullable(); |
||
| 40 | $table->text('description')->nullable(); |
||
| 41 | $table->timestamps(); |
||
| 42 | }); |
||
| 56 | } |