From 0027916f526004aa52f72051a70f9f696a097ab9 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 31 Mar 2020 12:36:13 +0200 Subject: Phantom WC standings removed pre-foreign keys --- import/01a_integrity_fixes.sql | 3 +++ 1 file changed, 3 insertions(+) (limited to 'import') diff --git a/import/01a_integrity_fixes.sql b/import/01a_integrity_fixes.sql index 559a576..1a57c1e 100644 --- a/import/01a_integrity_fixes.sql +++ b/import/01a_integrity_fixes.sql @@ -1,3 +1,6 @@ UPDATE qualifying SET q1 = NULL WHERE q1 = ''; UPDATE qualifying SET q2 = NULL WHERE q2 = ''; UPDATE qualifying SET q3 = NULL WHERE q3 = ''; + +DELETE FROM constructorStandings WHERE raceId NOT IN (SELECT raceId FROM races); +DELETE FROM driverStandings WHERE raceId NOT IN (SELECT raceId FROM races); -- cgit v1.2.3