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