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

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



INSERT INTO "Player" VALUES ("1", "1001", "Liam Smith", "1990-05-12", "180");
INSERT INTO "Player" VALUES ("2", "1002", "Noah Johnson", "1992-11-23", "175");
INSERT INTO "Player" VALUES ("3", "1003", "Oliver Williams", "1988-07-30", "182");
INSERT INTO "Player" VALUES ("4", "1004", "Elijah Brown", "1995-01-15", "178");
INSERT INTO "Player" VALUES ("5", "1005", "James Jones", "1991-03-10", "185");
INSERT INTO "Player_Attributes" VALUES ("1", "5001", "1001", "75", "80", "Right");
INSERT INTO "Player_Attributes" VALUES ("2", "5002", "1002", "82", "85", "Left");
INSERT INTO "Player_Attributes" VALUES ("3", "5003", "1003", "70", "70", "Right");
INSERT INTO "Player_Attributes" VALUES ("4", "5004", "1004", "65", "65", "Left");
INSERT INTO "Player_Attributes" VALUES ("5", "5005", "1005", "60", "60", "Right");
INSERT INTO "Player_Attributes" VALUES ("6", "5006", "1005", "62", "60", "Left");