Merge branch 'develop' into trunk

This commit is contained in:
Vincent BRIDIER 2025-08-29 15:06:38 +02:00
commit 7be9395ae4

View file

@ -16,7 +16,7 @@ return new class extends Migration
Schema::create('tenant_user', function (Blueprint $table) {
$table->unsignedBigInteger('user_id');
$table->string('tenant_id', 255);
$table->primary(['tenant_id']);
$table->primary(['user_id', 'tenant_id']);
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->foreign('tenant_id')->references('id')->on('tenants')->onDelete('cascade');
});