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 "Match" (
"id" INT,
"home_team_api_id" INT,
PRIMARY KEY ("id"),
FOREIGN KEY ("home_team_api_id") REFERENCES "Team"("team_api_id")
);

CREATE TABLE "Team" (
"id" INT,
"team_api_id" INT UNIQUE,
"team_long_name" TEXT,
"team_short_name" TEXT,
PRIMARY KEY ("id")
);

CREATE TABLE "Team_Attributes" (
"id" INT,
"team_api_id" INT,
"chanceCreationPassing" INT,
"chanceCreationPassingClass" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("team_api_id") REFERENCES "Team"("team_api_id")
);



INSERT INTO "Team" VALUES ("1", "1000", "Arsenal", "ARS");
INSERT INTO "Team" VALUES ("2", "1001", "Chelsea", "CHE");
INSERT INTO "Team" VALUES ("3", "1002", "Manchester United", "MUN");
INSERT INTO "Team" VALUES ("4", "1003", "Liverpool", "LIV");
INSERT INTO "Team" VALUES ("5", "1004", "Tottenham Hotspur", "TOT");
INSERT INTO "Team" VALUES ("6", "1005", "Everton", "EVE");
INSERT INTO "Team" VALUES ("7", "1006", "Leicester City", "LEI");
INSERT INTO "Team" VALUES ("8", "1007", "West Ham United", "WHU");
INSERT INTO "Team" VALUES ("9", "1008", "Southampton", "SOU");
INSERT INTO "Team" VALUES ("10", "1009", "Crystal Palace", "CRY");
INSERT INTO "Team_Attributes" VALUES ("1", "1000", "50", "Normal");
INSERT INTO "Team_Attributes" VALUES ("2", "1001", "30", "Safe");
INSERT INTO "Team_Attributes" VALUES ("3", "1002", "70", "Risky");
INSERT INTO "Team_Attributes" VALUES ("4", "1003", "40", "Safe");
INSERT INTO "Team_Attributes" VALUES ("5", "1004", "60", "Normal");
INSERT INTO "Team_Attributes" VALUES ("6", "1005", "35", "Safe");
INSERT INTO "Team_Attributes" VALUES ("7", "1006", "55", "Normal");
INSERT INTO "Team_Attributes" VALUES ("8", "1007", "25", "Safe");
INSERT INTO "Team_Attributes" VALUES ("9", "1008", "65", "Risky");
INSERT INTO "Team_Attributes" VALUES ("10", "1009", "45", "Normal");
INSERT INTO "Match" VALUES ("1", "1000");
INSERT INTO "Match" VALUES ("2", "1001");
INSERT INTO "Match" VALUES ("3", "1002");
INSERT INTO "Match" VALUES ("4", "1003");
INSERT INTO "Match" VALUES ("5", "1004");
INSERT INTO "Match" VALUES ("6", "1005");
INSERT INTO "Match" VALUES ("7", "1006");
INSERT INTO "Match" VALUES ("8", "1007");
INSERT INTO "Match" VALUES ("9", "1008");
INSERT INTO "Match" VALUES ("10", "1009");