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,
"height" INT,
"weight" INT,
PRIMARY KEY ("id")
);

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



INSERT INTO "Player" VALUES ("1", "1001", "175", "70");
INSERT INTO "Player" VALUES ("2", "1002", "182", "75");
INSERT INTO "Player" VALUES ("3", "1003", "178", "68");
INSERT INTO "Player" VALUES ("4", "1004", "179", "80");
INSERT INTO "Player" VALUES ("5", "1005", "185", "85");
INSERT INTO "Player" VALUES ("6", "1006", "170", "65");
INSERT INTO "Player" VALUES ("7", "1007", "177", "72");
INSERT INTO "Player" VALUES ("8", "1008", "181", "90");
INSERT INTO "Player" VALUES ("9", "1009", "160", "50");
INSERT INTO "Player" VALUES ("10", "1010", "174", "78");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "2023-01-01", "75", "80");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "2023-01-01", "65", "70");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "2023-01-01", "72", "75");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "2023-01-01", "85", "90");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "2023-01-01", "60", "65");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "2023-01-01", "55", "60");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "2023-01-01", "73", "78");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "2023-01-01", "88", "92");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "2023-01-01", "45", "50");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "2023-01-01", "71", "75");