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 "Documents" (
"Document_ID" INT,
"Template_ID" INT,
"Document_Name" VARCHAR(255),
PRIMARY KEY ("Document_ID"),
FOREIGN KEY ("Template_ID") REFERENCES "Templates"("Template_ID")
);

CREATE TABLE "Templates" (
"Template_ID" INT UNIQUE,
PRIMARY KEY ("Template_ID")
);





INSERT INTO "Templates" VALUES ("1");
INSERT INTO "Templates" VALUES ("2");
INSERT INTO "Templates" VALUES ("3");
INSERT INTO "Templates" VALUES ("4");
INSERT INTO "Templates" VALUES ("5");
INSERT INTO "Templates" VALUES ("6");
INSERT INTO "Templates" VALUES ("7");
INSERT INTO "Templates" VALUES ("8");
INSERT INTO "Templates" VALUES ("9");
INSERT INTO "Templates" VALUES ("10");
INSERT INTO "Documents" VALUES ("101", "1", "Employee Contract");
INSERT INTO "Documents" VALUES ("102", "1", "NDA Agreement");
INSERT INTO "Documents" VALUES ("103", "2", "Project Proposal");
INSERT INTO "Documents" VALUES ("104", "3", "Invoice Template");
INSERT INTO "Documents" VALUES ("105", "3", "Receipt Template");
INSERT INTO "Documents" VALUES ("106", "4", "Meeting Minutes");
INSERT INTO "Documents" VALUES ("107", "5", "Performance Review");
INSERT INTO "Documents" VALUES ("108", "6", "Budget Report");
INSERT INTO "Documents" VALUES ("109", "7", "Press Release");
INSERT INTO "Documents" VALUES ("110", "8", "Marketing Plan");
INSERT INTO "Documents" VALUES ("111", "9", "User Manual");
INSERT INTO "Documents" VALUES ("112", "10", "Training Guide");
INSERT INTO "Documents" VALUES ("113", "10", "Safety Procedures");
INSERT INTO "Documents" VALUES ("114", "10", "Emergency Contacts");