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

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



INSERT INTO "Player" VALUES ("1", "1001", "Lionel Messi", "5001", "1987-06-24");
INSERT INTO "Player" VALUES ("2", "1002", "Cristiano Ronaldo", "5002", "1985-02-05");
INSERT INTO "Player" VALUES ("3", "1003", "Neymar Jr", "5003", "1992-02-05");
INSERT INTO "Player" VALUES ("4", "1004", "Kylian Mbappe", "5004", "1998-12-20");
INSERT INTO "Player" VALUES ("5", "1005", "Luka Modric", "5005", "1985-09-09");
INSERT INTO "Player" VALUES ("6", "1006", "Zlatan Ibrahimovic", "5006", "1981-10-03");
INSERT INTO "Player" VALUES ("7", "1007", "Young Talent", "5007", "2005-01-01");
INSERT INTO "Player" VALUES ("8", "1008", "Average Joe", "5008", "1990-07-15");
INSERT INTO "Player" VALUES ("9", "1009", "Retired Star", "5009", "1975-03-10");
INSERT INTO "Player" VALUES ("10", "1010", "Injured Player", "5010", "1993-11-11");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "94", "95");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "94", "94");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "91", "92");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "90", "95");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "89", "89");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "88", "88");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "85", "99");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "75", "75");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "70", "70");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "0", "0");