delete foreign keys on teams in games table

This commit is contained in:
Laurent Le Houerou 2024-03-21 17:57:01 +00:00
parent 33f404fa20
commit c0fc470d72

View File

@ -71,17 +71,14 @@
fixture_slug TEXT NOT NULL, fixture_slug TEXT NOT NULL,
FOREIGN KEY (fixture_slug) REFERENCES fixtures (slug), FOREIGN KEY (fixture_slug) REFERENCES fixtures (slug),
away_team_slug TEXT NOT NULL, away_team_slug TEXT NOT NULL,
FOREIGN KEY (away_team_slug) REFERENCES teams (slug),
away_goals INTEGER NOT NULL, away_goals INTEGER NOT NULL,
away_extra_time_score INTEGER NOT NULL, away_extra_time_score INTEGER NOT NULL,
away_penalty_score INTEGER NOT NULL, away_penalty_score INTEGER NOT NULL,
home_team_slug TEXT NOT NULL, home_team_slug TEXT NOT NULL,
FOREIGN KEY (home_team_slug) REFERENCES teams (slug),
home_goals INTEGER NOT NULL, home_goals INTEGER NOT NULL,
home_extra_time_score INTEGER NOT NULL, home_extra_time_score INTEGER NOT NULL,
home_penalty_score INTEGER NOT NULL, home_penalty_score INTEGER NOT NULL,
winner_team_slug TEXT, winner_team_slug TEXT
FOREIGN KEY (winner_team_slug) REFERENCES teams (slug)
); );
CREATE TABLE IF NOT EXISTS players ( CREATE TABLE IF NOT EXISTS players (
@ -202,4 +199,4 @@
DROP TABLE IF EXISTS countries; DROP TABLE IF EXISTS countries;
DROP TABLE IF EXISTS zones; DROP TABLE IF EXISTS zones;