PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "circuits" (
"circuitId" INT,
"name" TEXT,
"country" TEXT,
PRIMARY KEY ("circuitId")
);

CREATE TABLE "races" (
"raceId" INT,
"year" INT,
"round" INT,
"name" TEXT,
"date" DATE,
PRIMARY KEY ("raceId")
);



INSERT INTO "circuits" VALUES ("1", "Silverstone Circuit", "United Kingdom");
INSERT INTO "circuits" VALUES ("2", "Monza Circuit", "Italy");
INSERT INTO "circuits" VALUES ("3", "Suzuka Circuit", "Japan");
INSERT INTO "races" VALUES ("101", "2020", "1", "British Grand Prix", "2020-07-19");
INSERT INTO "races" VALUES ("102", "2020", "2", "70th Anniversary Grand Prix", "2020-08-09");
INSERT INTO "races" VALUES ("103", "2020", "3", "Spanish Grand Prix", "2020-08-16");
INSERT INTO "races" VALUES ("104", "2021", "1", "Bahrain Grand Prix", "2021-03-28");
INSERT INTO "races" VALUES ("105", "2021", "2", "Emilia Romagna Grand Prix", "2021-04-18");
INSERT INTO "races" VALUES ("106", "2021", "3", "Portuguese Grand Prix", "2021-05-02");
INSERT INTO "races" VALUES ("107", "2019", "1", "Australian Grand Prix", "2019-03-17");
INSERT INTO "races" VALUES ("108", "2019", "2", "Bahrain Grand Prix", "2019-03-31");
INSERT INTO "races" VALUES ("109", "2019", "3", "Chinese Grand Prix", "2019-04-14");
INSERT INTO "races" VALUES ("110", "2019", "4", "Azerbaijan Grand Prix", "2019-04-28");
INSERT INTO "races" VALUES ("111", "2018", "1", "Australian Grand Prix", "2018-03-25");
INSERT INTO "races" VALUES ("112", "2018", "2", "Bahrain Grand Prix", "2018-04-08");
INSERT INTO "races" VALUES ("113", "2018", "3", "Chinese Grand Prix", "2018-04-15");
INSERT INTO "races" VALUES ("114", "2018", "4", "Azerbaijan Grand Prix", "2018-04-29");
INSERT INTO "races" VALUES ("115", "2018", "5", "Spanish Grand Prix", "2018-05-13");
INSERT INTO "races" VALUES ("116", "2017", "1", "Australian Grand Prix", "2017-03-26");
INSERT INTO "races" VALUES ("117", "2017", "2", "Chinese Grand Prix", "2017-04-09");
INSERT INTO "races" VALUES ("118", "2017", "3", "Bahrain Grand Prix", "2017-04-16");
INSERT INTO "races" VALUES ("119", "2017", "4", "Russian Grand Prix", "2017-04-30");
INSERT INTO "races" VALUES ("120", "2017", "5", "Spanish Grand Prix", "2017-05-14");
INSERT INTO "races" VALUES ("121", "2017", "6", "Monaco Grand Prix", "2017-05-28");
INSERT INTO "races" VALUES ("122", "2017", "7", "Canadian Grand Prix", "2017-06-11");
INSERT INTO "races" VALUES ("123", "2017", "8", "Azerbaijan Grand Prix", "2017-06-25");
INSERT INTO "races" VALUES ("124", "2017", "9", "Austrian Grand Prix", "2017-07-09");
INSERT INTO "races" VALUES ("125", "2017", "10", "British Grand Prix", "2017-07-16");
INSERT INTO "races" VALUES ("126", "2017", "11", "Hungarian Grand Prix", "2017-07-30");
INSERT INTO "races" VALUES ("127", "2017", "12", "Belgian Grand Prix", "2017-08-27");
INSERT INTO "races" VALUES ("128", "2017", "13", "Italian Grand Prix", "2017-09-03");
INSERT INTO "races" VALUES ("129", "2017", "14", "Singapore Grand Prix", "2017-09-17");
INSERT INTO "races" VALUES ("130", "2017", "15", "Malaysian Grand Prix", "2017-10-01");
INSERT INTO "races" VALUES ("131", "2017", "16", "Japanese Grand Prix", "2017-10-08");
INSERT INTO "races" VALUES ("132", "2017", "17", "United States Grand Prix", "2017-10-22");
INSERT INTO "races" VALUES ("133", "2017", "18", "Mexican Grand Prix", "2017-10-29");
INSERT INTO "races" VALUES ("134", "2017", "19", "Brazilian Grand Prix", "2017-11-12");
INSERT INTO "races" VALUES ("135", "2017", "20", "Abu Dhabi Grand Prix", "2017-11-26");
INSERT INTO "races" VALUES ("136", "2017", "21", "Test Race 1", "2017-03-05");
INSERT INTO "races" VALUES ("137", "2017", "22", "Test Race 2", "2017-03-15");