Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('degrees', function (Blueprint $table) { |
||
17 | $table->increments('id'); |
||
18 | $table->integer('degree_type_id')->unsigned()->nullable(); |
||
19 | $table->string('area_of_study')->nullable(); |
||
20 | $table->string('institution')->nullable(); |
||
21 | $table->string('thesis')->nullable(); |
||
22 | $table->date('start_date')->nullable(); |
||
23 | $table->date('end_date')->nullable(); |
||
24 | $table->integer('applicant_id')->unsigned(); |
||
25 | $table->timestamps(); |
||
26 | }); |
||
27 | |||
28 | Schema::create('degree_types', function (Blueprint $table) { |
||
29 | $table->increments('id'); |
||
30 | $table->string('name'); |
||
31 | $table->timestamps(); |
||
32 | }); |
||
33 | |||
34 | Schema::table('degrees', function (Blueprint $table) { |
||
35 | $table->foreign('degree_type_id')->references('id')-> |
||
36 | on('degree_types')->onUpdate('CASCADE')->onDelete('NO ACTION'); |
||
37 | $table->foreign('applicant_id')->references('id')-> |
||
38 | on('applicants')->onUpdate('CASCADE')->onDelete('CASCADE'); |
||
39 | }); |
||
53 |