Skip to content

Commit a394153

Browse files
committed
update unique constraint
1 parent 593e763 commit a394153

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: database/migrations/2020_05_21_300000_create_team_invitations_table.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ public function up()
1616
Schema::create('team_invitations', function (Blueprint $table) {
1717
$table->id();
1818
$table->foreignId('team_id')->constrained()->cascadeOnDelete();
19-
$table->string('email')->unique();
19+
$table->string('email');
2020
$table->string('role')->nullable();
2121
$table->timestamps();
22+
23+
$table->unique(['team_id', 'email']);
2224
});
2325
}
2426

0 commit comments

Comments
 (0)