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 "Treatment_Types" (
"treatment_type_code" VARCHAR(10) UNIQUE,
"treatment_type_description" VARCHAR(80),
PRIMARY KEY ("treatment_type_code")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"treatment_type_code" VARCHAR(10),
"cost_of_treatment" DECIMAL(19, 4),
PRIMARY KEY ("treatment_id"),
FOREIGN KEY ("treatment_type_code") REFERENCES "Treatment_Types"("treatment_type_code")
);





INSERT INTO "Treatment_Types" VALUES ("VACC", "Vaccination");
INSERT INTO "Treatment_Types" VALUES ("CHECKUP", "Annual Check-up");
INSERT INTO "Treatment_Types" VALUES ("SURG", "Surgery");
INSERT INTO "Treatment_Types" VALUES ("GROOM", "Grooming");
INSERT INTO "Treatment_Types" VALUES ("DENTAL", "Dental Cleaning");
INSERT INTO "Treatment_Types" VALUES ("MEDS", "Medication Dispensing");
INSERT INTO "Treatment_Types" VALUES ("EMERG", "Emergency Visit");
INSERT INTO "Treatment_Types" VALUES ("PHYS", "Physical Therapy");
INSERT INTO "Treatments" VALUES ("1", "VACC", "50.00");
INSERT INTO "Treatments" VALUES ("2", "CHECKUP", "75.50");
INSERT INTO "Treatments" VALUES ("3", "SURG", "1200.00");
INSERT INTO "Treatments" VALUES ("4", "GROOM", "45.00");
INSERT INTO "Treatments" VALUES ("5", "DENTAL", "250.00");
INSERT INTO "Treatments" VALUES ("6", "VACC", "50.00");
INSERT INTO "Treatments" VALUES ("7", "CHECKUP", "75.50");
INSERT INTO "Treatments" VALUES ("8", "MEDS", "25.75");
INSERT INTO "Treatments" VALUES ("9", "EMERG", "300.00");
INSERT INTO "Treatments" VALUES ("10", "PHYS", "150.00");
INSERT INTO "Treatments" VALUES ("11", "SURG", "950.00");
INSERT INTO "Treatments" VALUES ("12", "GROOM", "60.00");
INSERT INTO "Treatments" VALUES ("13", "DENTAL", "280.00");
INSERT INTO "Treatments" VALUES ("14", "MEDS", "40.00");
INSERT INTO "Treatments" VALUES ("15", "VACC", "50.00");