| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function up() |
||
| 15 | { |
||
| 16 | Schema::create('assessments', function (Blueprint $table) { |
||
| 17 | $table->increments('id'); |
||
| 18 | $table->integer('screening_plan_id'); |
||
| 19 | $table->integer('criterion_id'); |
||
| 20 | $table->integer('assessment_type_id'); |
||
| 21 | $table->timestamps(); |
||
| 22 | |||
| 23 | $table->unique(['screening_plan_id', 'criterion_id', 'assessment_type_id']); |
||
| 24 | |||
| 25 | $table->foreign('screening_plan_id')->references('id')->on('screening_plans')->onUpdate('CASCADE')->onDelete('CASCADE'); |
||
| 26 | $table->foreign('criterion_id')->references('id')->on('criteria')->onUpdate('CASCADE')->onDelete('NO ACTION'); |
||
| 27 | $table->foreign('assessment_type_id')->references('id')->on('assessment_types')->onUpdate('CASCADE')->onDelete('NO ACTION'); |
||
| 28 | }); |
||
| 41 |