| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class CreateMedFormFieldConditionsTables extends Migration |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Run the migrations. |
||
| 11 | * |
||
| 12 | * @return void |
||
| 13 | */ |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | if (!Schema::hasTable('med_form_field_conditions')) { |
||
| 17 | Schema::create('med_form_field_conditions', function (Blueprint $table) { |
||
| 18 | $table->id(); |
||
| 19 | $table->unsignedBigInteger('form_step_id')->nullable(); |
||
| 20 | $table->foreign('form_step_id')->references('id')->on('med_form_steps')->onDelete('set null'); |
||
| 21 | $table->unsignedBigInteger('form_field_id')->nullable(); |
||
| 22 | $table->foreign('form_field_id')->references('id')->on('med_form_fields')->onDelete('set null'); |
||
| 23 | $table->string('operation')->nullable(); |
||
| 24 | $table->string('eq')->nullable(); |
||
| 25 | $table->string('when')->nullable(); |
||
| 26 | $table->string('show')->nullable(); |
||
| 27 | $table->timestamps(); |
||
| 28 | }); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | /** |
||
| 32 | * Reverse the migrations. |
||
| 33 | * |
||
| 34 | * @return void |
||
| 35 | */ |
||
| 36 | public function down() |
||
| 39 | } |
||
| 40 | } |
||
| 41 |