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 "death" (
"caused_by_ship_id" INT,
"id" INT,
"note" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("caused_by_ship_id") REFERENCES "ship"("id")
);

CREATE TABLE "ship" (
"lost_in_battle" INT,
"id" INT,
"name" TEXT,
PRIMARY KEY ("id")
);





INSERT INTO "ship" VALUES ("1", "1", "HMS Victory");
INSERT INTO "ship" VALUES ("2", "2", "USS Constitution");
INSERT INTO "ship" VALUES ("3", "3", "Bismarck");
INSERT INTO "ship" VALUES ("4", "4", "Yamato");
INSERT INTO "ship" VALUES ("5", "5", "Santa Maria");
INSERT INTO "ship" VALUES ("6", "6", "Black Pearl");
INSERT INTO "ship" VALUES ("7", "7", "Flying Dutchman");
INSERT INTO "ship" VALUES ("8", "8", "Queen Annes Revenge");
INSERT INTO "ship" VALUES ("9", "9", "Enterprise");
INSERT INTO "ship" VALUES ("10", "10", "Millennium Falcon");
INSERT INTO "death" VALUES ("1", "1", "Crew member lost during battle in the East China Sea.");
INSERT INTO "death" VALUES ("2", "2", "Casualty reported near the East Coast.");
INSERT INTO "death" VALUES ("3", "3", "Fatal incident in the Eastern Atlantic.");
INSERT INTO "death" VALUES ("4", "4", "No casualties in the West Pacific.");
INSERT INTO "death" VALUES ("5", "5", "Sailor died of natural causes.");
INSERT INTO "death" VALUES ("6", "6", "Pirate attack in the East Indies.");
INSERT INTO "death" VALUES ("7", "7", "Mysterious disappearance in the Far East.");
INSERT INTO "death" VALUES ("8", "8", "Death due to storm, not related to East.");
INSERT INTO "death" VALUES ("9", "9", "Accidental death during training.");
INSERT INTO "death" VALUES ("10", "10", "Fatal error in navigation system, no East involved.");
INSERT INTO "death" VALUES ("1", "11", "Another crew member lost in the East China Sea.");
INSERT INTO "death" VALUES ("2", "12", "Minor injury, not death, near the East Coast.");
INSERT INTO "death" VALUES ("3", "13", "Death during a skirmish in the Eastern Mediterranean.");
INSERT INTO "death" VALUES ("6", "14", "Death during a raid in the East African coast.");
INSERT INTO "death" VALUES ("7", "15", "Lost at sea, possibly in the East Pacific.");