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", "VET", "Charlie", "charlie.vet@example.com");
INSERT INTO "Professionals" VALUES ("4", "NURSE", "Diana", "diana.nurse@example.com");
INSERT INTO "Professionals" VALUES ("5", "TECH", "Eve", "eve.tech@example.com");
INSERT INTO "Professionals" VALUES ("6", "VET", "Frank", "frank.vet@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", "2");
INSERT INTO "Treatments" VALUES ("105", "205", "4");
INSERT INTO "Treatments" VALUES ("106", "206", "4");
INSERT INTO "Treatments" VALUES ("107", "207", "4");
INSERT INTO "Treatments" VALUES ("108", "208", "5");