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,
"first_name" VARCHAR(50),
"last_name" VARCHAR(50),
PRIMARY KEY ("professional_id")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"dog_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", "Alice", "Smith");
INSERT INTO "Professionals" VALUES ("2", "Bob", "Johnson");
INSERT INTO "Professionals" VALUES ("3", "Carol", "Williams");
INSERT INTO "Professionals" VALUES ("4", "David", "Brown");
INSERT INTO "Professionals" VALUES ("5", "Eve", "Jones");
INSERT INTO "Treatments" VALUES ("101", "201", "1", "VACC", "2024-01-15 09:00:00");
INSERT INTO "Treatments" VALUES ("102", "202", "2", "SURG", "2024-01-15 10:30:00");
INSERT INTO "Treatments" VALUES ("103", "203", "3", "CHECK", "2024-01-16 11:00:00");
INSERT INTO "Treatments" VALUES ("104", "204", "1", "VACC", "2024-01-17 14:00:00");
INSERT INTO "Treatments" VALUES ("105", "205", "4", "DENT", "2024-01-18 15:30:00");
INSERT INTO "Treatments" VALUES ("106", "206", "5", "SURG", "2024-01-19 08:00:00");
INSERT INTO "Treatments" VALUES ("107", "207", "2", "CHECK", "2024-01-20 09:30:00");
INSERT INTO "Treatments" VALUES ("108", "208", "3", "VACC", "2024-01-21 10:00:00");
INSERT INTO "Treatments" VALUES ("109", "209", "4", "SURG", "2024-01-22 11:15:00");
INSERT INTO "Treatments" VALUES ("110", "210", "5", "DENT", "2024-01-23 13:45:00");
INSERT INTO "Treatments" VALUES ("111", "211", "1", "CHECK", "2024-01-24 14:30:00");
INSERT INTO "Treatments" VALUES ("112", "212", "2", "VACC", "2024-01-25 15:00:00");
INSERT INTO "Treatments" VALUES ("113", "213", "3", "DENT", "2024-01-26 16:00:00");
INSERT INTO "Treatments" VALUES ("114", "214", "4", "CHECK", "2024-01-27 09:00:00");
INSERT INTO "Treatments" VALUES ("115", "215", "5", "VACC", "2024-01-28 10:30:00");