| Conditions | 3 |
| Paths | 4 |
| Total Lines | 30 |
| Code Lines | 24 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | |||
| 17 | if (!Schema::hasTable('med_form_steps')) { |
||
| 18 | Schema::create('med_form_steps', function (Blueprint $table) { |
||
| 19 | $table->id(); |
||
| 20 | $table->integer('order')->nullable(); |
||
| 21 | $table->string('key')->nullable(); |
||
| 22 | $table->boolean('is_active')->default(0); |
||
| 23 | $table->unsignedBigInteger('form_id')->nullable(); |
||
| 24 | $table->foreign('form_id') |
||
| 25 | ->references('id') |
||
| 26 | ->on('med_forms') |
||
| 27 | ->onDelete('set null'); |
||
| 28 | $table->timestamps(); |
||
| 29 | }); |
||
| 30 | } |
||
| 31 | |||
| 32 | if (!Schema::hasTable('med_step_form_translations')) { |
||
| 33 | Schema::create('med_form_step_translations', function (Blueprint $table) { |
||
| 34 | $table->id(); |
||
| 35 | $table->string('title', 255)->nullable(); |
||
| 36 | $table->string('locale')->nullable(); |
||
| 37 | $table->unsignedBigInteger('form_step_id')->nullable(); |
||
| 38 | $table->foreign('form_step_id') |
||
| 39 | ->references('id') |
||
| 40 | ->on('med_form_steps') |
||
| 41 | ->onDelete('set null'); |
||
| 42 | $table->text('description')->nullable(); |
||
| 43 | $table->timestamps(); |
||
| 44 | }); |
||
| 62 |