Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('references', function (Blueprint $table) { |
||
17 | $table->increments('id'); |
||
18 | $table->string('name')->nullable(); |
||
19 | $table->string('email')->nullable(); |
||
20 | $table->integer('relationship_id')->unsigned()->nullable(); |
||
21 | $table->text('description')->nullable(); |
||
22 | $table->integer('applicant_id')->unsigned(); |
||
23 | $table->timestamps(); |
||
24 | }); |
||
25 | |||
26 | Schema::table('references', function (Blueprint $table) { |
||
27 | $table->foreign('applicant_id')->references('id')-> |
||
28 | on('applicants')->onUpdate('CASCADE')->onDelete('CASCADE'); |
||
29 | $table->foreign('relationship_id')->references('id') |
||
30 | ->on('relationships')->onUpdate('CASCADE')->onDelete('NO ACTION'); |
||
31 | }); |
||
44 |