Skip to content

Commit 0485be3

Browse files
committed
fix(schema): change matches commitment FKs from restrict to cascade
1 parent b32f73f commit 0485be3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal/repository/postgres/schema/migrations/000001_create_initial_schema.up.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,12 +437,12 @@ CREATE TABLE "matches"
437437
CONSTRAINT "matches_one_commitment_fkey"
438438
FOREIGN KEY ("application_id","epoch_index","tournament_address","commitment_one")
439439
REFERENCES "commitments"("application_id","epoch_index","tournament_address","commitment")
440-
ON DELETE RESTRICT,
440+
ON DELETE CASCADE,
441441

442442
CONSTRAINT "matches_two_commitment_fkey"
443443
FOREIGN KEY ("application_id","epoch_index","tournament_address","commitment_two")
444444
REFERENCES "commitments"("application_id","epoch_index","tournament_address","commitment")
445-
ON DELETE RESTRICT
445+
ON DELETE CASCADE
446446
);
447447

448448
CREATE UNIQUE INDEX "matches_unique_pair_idx"

0 commit comments

Comments
 (0)