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,
"treatment_type_code" VARCHAR(10),
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("professional_id") REFERENCES "Professionals"("professional_id")
);





INSERT INTO "Professionals" VALUES ("1", "VET", "Alice", "alice@example.com");
INSERT INTO "Professionals" VALUES ("2", "GROOMER", "Bob", "bob@example.com");
INSERT INTO "Professionals" VALUES ("3", "TRAINER", "Charlie", "charlie@example.com");
INSERT INTO "Professionals" VALUES ("4", "VET", "David", "david@example.com");
INSERT INTO "Professionals" VALUES ("5", "GROOMER", "Eve", "eve@example.com");
INSERT INTO "Professionals" VALUES ("6", "ADMIN", "Frank", "frank@example.com");
INSERT INTO "Professionals" VALUES ("7", "VET", "Grace", "grace@example.com");
INSERT INTO "Professionals" VALUES ("8", "TRAINER", "Heidi", "heidi@example.com");
INSERT INTO "Professionals" VALUES ("9", "GROOMER", "Ivan", "ivan@example.com");
INSERT INTO "Professionals" VALUES ("10", "VET", "Judy", "judy@example.com");
INSERT INTO "Treatments" VALUES ("1", "101", "1", "VACCINE");
INSERT INTO "Treatments" VALUES ("2", "102", "1", "CHECKUP");
INSERT INTO "Treatments" VALUES ("3", "103", "2", "BATH");
INSERT INTO "Treatments" VALUES ("4", "104", "4", "SURGERY");
INSERT INTO "Treatments" VALUES ("5", "105", "5", "HAIRCUT");
INSERT INTO "Treatments" VALUES ("6", "106", "1", "CHECKUP");
INSERT INTO "Treatments" VALUES ("7", "107", "2", "NAIL_TRIM");
INSERT INTO "Treatments" VALUES ("8", "108", "4", "VACCINE");
INSERT INTO "Treatments" VALUES ("9", "109", "5", "BRUSHING");
INSERT INTO "Treatments" VALUES ("10", "110", "1", "SURGERY");
INSERT INTO "Treatments" VALUES ("11", "111", "7", "CHECKUP");
INSERT INTO "Treatments" VALUES ("12", "112", "7", "VACCINE");
INSERT INTO "Treatments" VALUES ("13", "113", "8", "OBEDIENCE");
INSERT INTO "Treatments" VALUES ("14", "114", "9", "BATH");
INSERT INTO "Treatments" VALUES ("15", "115", "10", "CHECKUP");