From ab6ef69a3300b41456cdcfa945628db4d9c0e149 Mon Sep 17 00:00:00 2001 From: Artemis Date: Sat, 24 Feb 2024 22:57:10 +0000 Subject: [PATCH] fix constraint order in migration file (regression from previous commit) --- migrations/20231119184930_initial.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/20231119184930_initial.sql b/migrations/20231119184930_initial.sql index 8b5b6e9..aad6338 100644 --- a/migrations/20231119184930_initial.sql +++ b/migrations/20231119184930_initial.sql @@ -101,7 +101,7 @@ CREATE TABLE IF NOT EXISTS game ( id SERIAL PRIMARY KEY, -- The user who played the game - account_id INTEGER REFERENCES account(id) NOT NULL ON DELETE CASCADE, + account_id INTEGER REFERENCES account(id) ON DELETE CASCADE NOT NULL, -- When the game was started started_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT TIMEZONE('utc', NOW()), @@ -123,7 +123,7 @@ CREATE TABLE IF NOT EXISTS game ( -- A guess in a game CREATE TABLE IF NOT EXISTS game_guess ( -- The game this guess is for - game_id INTEGER REFERENCES game(id) NOT NULL ON DELETE CASCADE, + game_id INTEGER REFERENCES game(id) ON DELETE CASCADE NOT NULL, -- Which number guess this was (1 for the first guess, etc.) guess_number INTEGER NOT NULL,