Skip to content

Commit

Permalink
fix constraint order in migration file (regression from previous commit)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemis21 committed Feb 24, 2024
1 parent 6c29a9d commit ab6ef69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migrations/20231119184930_initial.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand All @@ -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,
Expand Down

0 comments on commit ab6ef69

Please sign in to comment.