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

CREATE TABLE "Team" (
"id" INT,
"team_api_id" INT UNIQUE,
"team_fifa_api_id" INT UNIQUE,
PRIMARY KEY ("id")
);

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



INSERT INTO "Team" VALUES ("1", "1000", "1");
INSERT INTO "Team" VALUES ("2", "1001", "2");
INSERT INTO "Team" VALUES ("3", "1002", "3");
INSERT INTO "Team" VALUES ("4", "1003", "4");
INSERT INTO "Team" VALUES ("5", "1004", "5");
INSERT INTO "Team" VALUES ("6", "1005", "6");
INSERT INTO "Team" VALUES ("7", "1006", "7");
INSERT INTO "Team" VALUES ("8", "1007", "8");
INSERT INTO "Team" VALUES ("9", "1008", "9");
INSERT INTO "Team" VALUES ("10", "1009", "10");
INSERT INTO "Match" VALUES ("1", "1000", "1001");
INSERT INTO "Match" VALUES ("2", "1002", "1003");
INSERT INTO "Match" VALUES ("3", "1004", "1005");
INSERT INTO "Match" VALUES ("4", "1006", "1007");
INSERT INTO "Match" VALUES ("5", "1008", "1009");
INSERT INTO "Match" VALUES ("6", "1000", "1002");
INSERT INTO "Match" VALUES ("7", "1001", "1003");
INSERT INTO "Team_Attributes" VALUES ("1", "1000", "55", "Balanced");
INSERT INTO "Team_Attributes" VALUES ("2", "1001", "60", "Fast");
INSERT INTO "Team_Attributes" VALUES ("3", "1002", "45", "Slow");
INSERT INTO "Team_Attributes" VALUES ("4", "1003", "51", "Balanced");
INSERT INTO "Team_Attributes" VALUES ("5", "1004", "59", "Balanced");
INSERT INTO "Team_Attributes" VALUES ("6", "1005", "65", "Fast");
INSERT INTO "Team_Attributes" VALUES ("7", "1006", "40", "Slow");
INSERT INTO "Team_Attributes" VALUES ("8", "1007", "50", "Balanced");
INSERT INTO "Team_Attributes" VALUES ("9", "1008", "58", "Balanced");
INSERT INTO "Team_Attributes" VALUES ("10", "1009", "52", "Balanced");