Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('ability_role', function (Blueprint $table) { |
||
17 | $table->uuid('ability_id'); |
||
18 | $table->uuid('role_id'); |
||
19 | $table->timestamps(); |
||
20 | |||
21 | $table->foreign('ability_id') |
||
22 | ->references('id') |
||
23 | ->on('abilities') |
||
24 | ->onDelete('cascade'); |
||
25 | |||
26 | $table->foreign('role_id') |
||
27 | ->references('id') |
||
28 | ->on('roles') |
||
29 | ->onDelete('cascade'); |
||
30 | |||
31 | $table->primary(['ability_id', 'role_id']); |
||
32 | }); |
||
45 |