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_fifa_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,
"buildUpPlayPassingClass" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("team_api_id") REFERENCES "Team"("team_api_id")
);



INSERT INTO "Team" VALUES ("1", "1001", "1", "Columbus Crew", "CLB");
INSERT INTO "Team" VALUES ("2", "1002", "2", "Los Angeles Galaxy", "LAG");
INSERT INTO "Team" VALUES ("3", "1003", "3", "Seattle Sounders FC", "SEA");
INSERT INTO "Team" VALUES ("4", "1004", "4", "New York City FC", "NYC");
INSERT INTO "Team" VALUES ("5", "1005", "5", "Orlando City SC", "ORL");
INSERT INTO "Team" VALUES ("6", "1006", "6", "FC Dallas", "DAL");
INSERT INTO "Team" VALUES ("7", "1007", "7", "Portland Timbers", "POR");
INSERT INTO "Team" VALUES ("8", "1008", "8", "Sporting Kansas City", "SKC");
INSERT INTO "Team" VALUES ("9", "1009", "9", "Atlanta United FC", "ATL");
INSERT INTO "Team" VALUES ("10", "1010", "10", "Toronto FC", "TOR");
INSERT INTO "Team_Attributes" VALUES ("1", "1001", "Short");
INSERT INTO "Team_Attributes" VALUES ("2", "1002", "Mixed");
INSERT INTO "Team_Attributes" VALUES ("3", "1003", "Long");
INSERT INTO "Team_Attributes" VALUES ("4", "1004", "Short");
INSERT INTO "Team_Attributes" VALUES ("5", "1005", "Mixed");
INSERT INTO "Team_Attributes" VALUES ("6", "1006", "Long");
INSERT INTO "Team_Attributes" VALUES ("7", "1007", "Short");
INSERT INTO "Team_Attributes" VALUES ("8", "1008", "Mixed");
INSERT INTO "Team_Attributes" VALUES ("9", "1009", "Long");
INSERT INTO "Team_Attributes" VALUES ("10", "1010", "Short");
INSERT INTO "Match" VALUES ("1", "1001");
INSERT INTO "Match" VALUES ("2", "1002");
INSERT INTO "Match" VALUES ("3", "1003");
INSERT INTO "Match" VALUES ("4", "1004");
INSERT INTO "Match" VALUES ("5", "1005");
INSERT INTO "Match" VALUES ("6", "1006");
INSERT INTO "Match" VALUES ("7", "1007");
INSERT INTO "Match" VALUES ("8", "1008");
INSERT INTO "Match" VALUES ("9", "1009");
INSERT INTO "Match" VALUES ("10", "1010");