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 "Player" (
"id" INT,
"player_api_id" INT UNIQUE,
"birthday" TEXT,
"height" INT,
PRIMARY KEY ("id")
);

CREATE TABLE "Player_Attributes" (
"id" INT,
"player_api_id" INT,
"date" TEXT,
"overall_rating" INT,
"long_passing" INT,
PRIMARY KEY ("id"),
FOREIGN KEY ("player_api_id") REFERENCES "Player"("player_api_id")
);

CREATE TABLE "Team_Attributes" (
"id" INT,
"chanceCreationPassing" INT,
PRIMARY KEY ("id")
);



INSERT INTO "Player" VALUES ("1", "1001", "1980-05-20", "180");
INSERT INTO "Player" VALUES ("2", "1002", "1975-12-15", "175");
INSERT INTO "Player" VALUES ("3", "1003", "1990-07-10", "185");
INSERT INTO "Player" VALUES ("4", "1004", "1975-12-15", "178");
INSERT INTO "Player" VALUES ("5", "1005", "1985-03-30", "182");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "2010-06-01", "75", "60");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "2010-06-01", "80", "70");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "2010-06-01", "78", "65");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "2010-06-01", "82", "72");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "2010-06-01", "77", "68");
INSERT INTO "Player_Attributes" VALUES ("6", "1002", "2011-06-01", "81", "75");
INSERT INTO "Player_Attributes" VALUES ("7", "1004", "2011-06-01", "83", "74");
INSERT INTO "Team_Attributes" VALUES ("1", "85");
INSERT INTO "Team_Attributes" VALUES ("2", "90");