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 "Professionals" (
"professional_id" INT UNIQUE,
"role_code" VARCHAR(10),
"first_name" VARCHAR(50),
"email_address" VARCHAR(50),
PRIMARY KEY ("professional_id")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"dog_id" INT,
"professional_id" INT,
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("professional_id") REFERENCES "Professionals"("professional_id")
);





INSERT INTO "Professionals" VALUES ("1", "VET", "Alice", "alice.vet@example.com");
INSERT INTO "Professionals" VALUES ("2", "TECH", "Bob", "bob.tech@example.com");
INSERT INTO "Professionals" VALUES ("3", "NURSE", "Carol", "carol.nurse@example.com");
INSERT INTO "Professionals" VALUES ("4", "ADMIN", "David", "david.admin@example.com");
INSERT INTO "Professionals" VALUES ("5", "VET", "Eve", "eve.vet@example.com");
INSERT INTO "Professionals" VALUES ("6", "RECEP", "Frank", "frank.recep@example.com");
INSERT INTO "Professionals" VALUES ("7", "TECH", "Grace", "grace.tech@example.com");
INSERT INTO "Professionals" VALUES ("8", "NURSE", "Hank", "hank.nurse@example.com");
INSERT INTO "Professionals" VALUES ("9", "VET", "Ivy", "ivy.vet@example.com");
INSERT INTO "Professionals" VALUES ("10", "ADMIN", "Jack", "jack.admin@example.com");
INSERT INTO "Treatments" VALUES ("101", "201", "1");
INSERT INTO "Treatments" VALUES ("102", "202", "1");
INSERT INTO "Treatments" VALUES ("103", "203", "2");
INSERT INTO "Treatments" VALUES ("104", "204", "3");
INSERT INTO "Treatments" VALUES ("105", "201", "5");
INSERT INTO "Treatments" VALUES ("106", "205", "5");
INSERT INTO "Treatments" VALUES ("107", "206", "7");
INSERT INTO "Treatments" VALUES ("108", "207", "9");
INSERT INTO "Treatments" VALUES ("109", "208", "9");
INSERT INTO "Treatments" VALUES ("110", "209", "9");
INSERT INTO "Treatments" VALUES ("111", "210", "2");
INSERT INTO "Treatments" VALUES ("112", "211", "3");
INSERT INTO "Treatments" VALUES ("113", "212", "7");
INSERT INTO "Treatments" VALUES ("114", "213", "1");
INSERT INTO "Treatments" VALUES ("115", "214", "5");
INSERT INTO "Treatments" VALUES ("116", "215", "9");
INSERT INTO "Treatments" VALUES ("117", "216", "2");
INSERT INTO "Treatments" VALUES ("118", "217", "3");
INSERT INTO "Treatments" VALUES ("119", "218", "7");
INSERT INTO "Treatments" VALUES ("120", "219", "1");
INSERT INTO "Treatments" VALUES ("121", "220", "5");
INSERT INTO "Treatments" VALUES ("122", "301", "1");
INSERT INTO "Treatments" VALUES ("123", "302", "2");
INSERT INTO "Treatments" VALUES ("124", "303", "3");
INSERT INTO "Treatments" VALUES ("125", "304", "5");
INSERT INTO "Treatments" VALUES ("126", "305", "7");
INSERT INTO "Treatments" VALUES ("127", "306", "9");
INSERT INTO "Treatments" VALUES ("128", "401", "1");
INSERT INTO "Treatments" VALUES ("129", "402", "2");
INSERT INTO "Treatments" VALUES ("130", "403", "3");
INSERT INTO "Treatments" VALUES ("131", "501", "5");
INSERT INTO "Treatments" VALUES ("132", "502", "7");
INSERT INTO "Treatments" VALUES ("133", "503", "9");