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 "Team" (
"id" INT,
"team_api_id" INT UNIQUE,
"team_long_name" TEXT,
PRIMARY KEY ("id")
);

CREATE TABLE "Team_Attributes" (
"id" INT,
"team_api_id" INT,
"date" TEXT,
"buildUpPlaySpeedClass" TEXT,
"buildUpPlayPassingClass" TEXT,
"chanceCreationPassingClass" TEXT,
"defencePressureClass" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("team_api_id") REFERENCES "Team"("team_api_id")
);



INSERT INTO "Team" VALUES ("1", "1001", "Willem II");
INSERT INTO "Team" VALUES ("2", "1002", "Ajax");
INSERT INTO "Team" VALUES ("3", "1003", "PSV Eindhoven");
INSERT INTO "Team" VALUES ("4", "1004", "Feyenoord");
INSERT INTO "Team" VALUES ("5", "1005", "AZ Alkmaar");
INSERT INTO "Team_Attributes" VALUES ("1", "1001", "2012-02-22", "Fast", "Short", "High", "Medium");
INSERT INTO "Team_Attributes" VALUES ("2", "1001", "2012-03-01", "Slow", "Long", "Medium", "High");
INSERT INTO "Team_Attributes" VALUES ("3", "1002", "2012-02-22", "Medium", "Medium", "Low", "Low");
INSERT INTO "Team_Attributes" VALUES ("4", "1003", "2012-02-22", "Fast", "Short", "High", "High");
INSERT INTO "Team_Attributes" VALUES ("5", "1004", "2012-02-22", "Slow", "Long", "Medium", "Medium");
INSERT INTO "Team_Attributes" VALUES ("6", "1005", "2012-02-22", "Medium", "Medium", "Low", "Low");
INSERT INTO "Team_Attributes" VALUES ("7", "1001", "2011-12-31", "Medium", "Short", "Medium", "Medium");
INSERT INTO "Team_Attributes" VALUES ("8", "1001", "2012-02-21", "Fast", "Long", "High", "High");
INSERT INTO "Team_Attributes" VALUES ("9", "1001", "2012-02-23", "Slow", "Short", "Low", "Low");