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,
"height" INT,
"weight" INT,
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", "170", "72");
INSERT INTO "Player" VALUES ("2", "1002", "Cristiano Ronaldo", "187", "83");
INSERT INTO "Player" VALUES ("3", "1003", "Neymar Jr", "175", "68");
INSERT INTO "Player" VALUES ("4", "1004", "Kylian Mbappe", "178", "73");
INSERT INTO "Player" VALUES ("5", "1005", "Kevin De Bruyne", "181", "70");
INSERT INTO "Player" VALUES ("6", "1006", "Robert Lewandowski", "184", "79");
INSERT INTO "Player" VALUES ("7", "1007", "Virgil van Dijk", "193", "92");
INSERT INTO "Player" VALUES ("8", "1008", "Sergio Ramos", "184", "82");
INSERT INTO "Player" VALUES ("9", "1009", "Luka Modric", "172", "66");
INSERT INTO "Player" VALUES ("10", "1010", "Mohamed Salah", "175", "71");
INSERT INTO "Player_Attributes" VALUES ("1", "1001", "94", "95");
INSERT INTO "Player_Attributes" VALUES ("2", "1002", "93", "94");
INSERT INTO "Player_Attributes" VALUES ("3", "1003", "91", "92");
INSERT INTO "Player_Attributes" VALUES ("4", "1004", "90", "93");
INSERT INTO "Player_Attributes" VALUES ("5", "1005", "89", "91");
INSERT INTO "Player_Attributes" VALUES ("6", "1006", "88", "90");
INSERT INTO "Player_Attributes" VALUES ("7", "1007", "87", "89");
INSERT INTO "Player_Attributes" VALUES ("8", "1008", "86", "88");
INSERT INTO "Player_Attributes" VALUES ("9", "1009", "85", "87");
INSERT INTO "Player_Attributes" VALUES ("10", "1010", "84", "86");
INSERT INTO "Player" VALUES ("11", "1011", "Max Strength Player", "180", "75");
INSERT INTO "Player_Attributes" VALUES ("11", "1011", "94", "96");