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", "TRAINER", "Bob", "bob@example.com");
INSERT INTO "Professionals" VALUES ("3", "GROOMER", "Charlie", "charlie@example.com");
INSERT INTO "Professionals" VALUES ("4", "VET", "David", "david@example.com");
INSERT INTO "Professionals" VALUES ("5", "ADMIN", "Eve", "eve@example.com");
INSERT INTO "Professionals" VALUES ("6", "TRAINER", "Frank", "frank@example.com");
INSERT INTO "Professionals" VALUES ("7", "GROOMER", "Grace", "grace@example.com");
INSERT INTO "Professionals" VALUES ("8", "VET", "Heidi", "heidi@example.com");
INSERT INTO "Treatments" VALUES ("1", "101", "1", "VACCINE");
INSERT INTO "Treatments" VALUES ("2", "102", "2", "OBEDIENCE");
INSERT INTO "Treatments" VALUES ("3", "103", "3", "BATH");
INSERT INTO "Treatments" VALUES ("4", "104", "1", "CHECKUP");
INSERT INTO "Treatments" VALUES ("5", "105", "2", "AGILITY");
INSERT INTO "Treatments" VALUES ("6", "106", "3", "HAIRCUT");
INSERT INTO "Treatments" VALUES ("7", "107", "1", "SURGERY");
INSERT INTO "Treatments" VALUES ("8", "108", "7", "NAIL_TRIM");
INSERT INTO "Treatments" VALUES ("9", "109", "8", "DENTAL");
INSERT INTO "Treatments" VALUES ("10", "110", "2", "BEHAVIOR");