Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('skills', function (Blueprint $table) { |
||
17 | $table->increments('id'); |
||
18 | $table->integer('skill_type_id')->unsigned(); |
||
19 | $table->string('name'); |
||
20 | $table->timestamps(); |
||
21 | }); |
||
22 | |||
23 | Schema::create('skill_types', function (Blueprint $table) { |
||
24 | $table->increments('id'); |
||
25 | $table->string('name'); |
||
26 | $table->timestamps(); |
||
27 | }); |
||
28 | |||
29 | Schema::table('skills', function(Blueprint $table) |
||
30 | { |
||
31 | $table->foreign('skill_type_id')->references('id')-> |
||
32 | on('skill_types')->onUpdate('CASCADE')->onDelete('NO ACTION'); |
||
33 | }); |
||
47 |