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,
"team_short_name" TEXT,
PRIMARY KEY ("id")
);

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



INSERT INTO "Team" VALUES ("1", "1001", "Heart of Midlothian", "Hearts");
INSERT INTO "Team" VALUES ("2", "1002", "Celtic", "Celtic");
INSERT INTO "Team" VALUES ("3", "1003", "Rangers", "Rangers");
INSERT INTO "Team" VALUES ("4", "1004", "Aberdeen", "Aberdeen");
INSERT INTO "Team_Attributes" VALUES ("1", "1001", "70", "65", "60");
INSERT INTO "Team_Attributes" VALUES ("2", "1001", "80", "70", "75");
INSERT INTO "Team_Attributes" VALUES ("3", "1001", "75", "68", "70");
INSERT INTO "Team_Attributes" VALUES ("4", "1002", "85", "80", "78");
INSERT INTO "Team_Attributes" VALUES ("5", "1003", "60", "55", "50");
INSERT INTO "Team_Attributes" VALUES ("6", "1004", "65", "60", "62");
INSERT INTO "Team_Attributes" VALUES ("7", "1001", "0", "50", "40");
INSERT INTO "Team_Attributes" VALUES ("8", "1001", "100", "90", "95");