| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 17 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 11 | public function up() | ||
| 12 |     { | ||
| 13 |         Schema::create(config('rinvex.contacts.tables.contact_relations'), function (Blueprint $table) { | ||
| 14 | // Columns | ||
| 15 |             $table->integer('contact_id')->unsigned(); | ||
| 16 |             $table->integer('related_id')->unsigned(); | ||
| 17 |             $table->string('relation'); | ||
| 18 | $table->timestamps(); | ||
| 19 | |||
| 20 | // Indexes | ||
| 21 | $table->primary(['contact_id', 'related_id']); | ||
| 22 |             $table->foreign('contact_id')->references('id')->on(config('rinvex.contacts.tables.contacts')) | ||
| 23 |                   ->onDelete('cascade')->onUpdate('cascade'); | ||
| 24 |             $table->foreign('related_id')->references('id')->on(config('rinvex.contacts.tables.contacts')) | ||
| 25 |                   ->onDelete('cascade')->onUpdate('cascade'); | ||
| 26 | }); | ||
| 27 | } | ||
| 28 | |||
| 34 |