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

CREATE TABLE "death" (
"id" INT,
"killed" INT,
PRIMARY KEY ("id")
);

CREATE TABLE "ship" (
"lost_in_battle" INT,
"id" INT,
"disposition_of_ship" TEXT,
PRIMARY KEY ("id"),
FOREIGN KEY ("lost_in_battle") REFERENCES "battle"("id")
);





INSERT INTO "battle" VALUES ("1", "victory");
INSERT INTO "battle" VALUES ("2", "defeat");
INSERT INTO "battle" VALUES ("3", "draw");
INSERT INTO "battle" VALUES ("4", "victory");
INSERT INTO "battle" VALUES ("5", "defeat");
INSERT INTO "battle" VALUES ("6", "draw");
INSERT INTO "battle" VALUES ("7", "victory");
INSERT INTO "death" VALUES ("1", "100");
INSERT INTO "death" VALUES ("2", "500");
INSERT INTO "death" VALUES ("3", "50");
INSERT INTO "death" VALUES ("4", "200");
INSERT INTO "death" VALUES ("5", "750");
INSERT INTO "death" VALUES ("6", "120");
INSERT INTO "death" VALUES ("7", "300");
INSERT INTO "ship" VALUES ("1", "101", "sunk");
INSERT INTO "ship" VALUES ("2", "102", "captured");
INSERT INTO "ship" VALUES ("3", "103", "damaged");
INSERT INTO "ship" VALUES ("4", "104", "sunk");
INSERT INTO "ship" VALUES ("5", "105", "captured");
INSERT INTO "ship" VALUES ("6", "106", "damaged");
INSERT INTO "ship" VALUES ("7", "107", "sunk");
INSERT INTO "ship" VALUES ("1", "108", "damaged");
INSERT INTO "ship" VALUES ("2", "109", "sunk");