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,
"professional_id" INT,
"treatment_type_code" VARCHAR(10),
"date_of_treatment" DATETIME,
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", "1", "VAC", "2024-01-10 09:00:00");
INSERT INTO "Treatments" VALUES ("102", "1", "CHK", "2024-01-15 10:30:00");
INSERT INTO "Treatments" VALUES ("103", "2", "SURG", "2024-02-20 14:00:00");
INSERT INTO "Treatments" VALUES ("104", "3", "VAC", "2024-03-05 11:00:00");
INSERT INTO "Treatments" VALUES ("105", "3", "CHK", "2024-03-10 09:30:00");
INSERT INTO "Treatments" VALUES ("106", "3", "DENT", "2024-03-15 13:00:00");
INSERT INTO "Treatments" VALUES ("107", "4", "CHK", "2024-04-01 08:45:00");
INSERT INTO "Treatments" VALUES ("108", "5", "VAC", "2024-04-10 10:00:00");
INSERT INTO "Treatments" VALUES ("109", "6", "SURG", "2024-05-12 15:00:00");
INSERT INTO "Treatments" VALUES ("110", "6", "CHK", "2024-05-20 09:00:00");
INSERT INTO "Treatments" VALUES ("111", "6", "DENT", "2024-05-25 11:30:00");