| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function up(): void |
||
| 17 | { |
||
| 18 | Schema::create(config('rinvex.tenants.tables.tenantables'), function (Blueprint $table) { |
||
| 19 | // Columns |
||
| 20 | $table->integer('tenant_id')->unsigned(); |
||
| 21 | $table->morphs('tenantable'); |
||
| 22 | $table->timestamps(); |
||
| 23 | |||
| 24 | // Indexes |
||
| 25 | $table->unique(['tenant_id', 'tenantable_id', 'tenantable_type'], 'tenantables_ids_type_unique'); |
||
| 26 | $table->foreign('tenant_id')->references('id')->on(config('rinvex.tenants.tables.tenants')) |
||
| 27 | ->onDelete('cascade')->onUpdate('cascade'); |
||
| 28 | }); |
||
| 29 | } |
||
| 30 | |||
| 41 |