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 "Charges" (
"charge_id" INT,
PRIMARY KEY ("charge_id")
);

CREATE TABLE "Dogs" (
"dog_id" INT UNIQUE,
"date_arrived" DATETIME,
"date_departed" DATETIME,
PRIMARY KEY ("dog_id")
);

CREATE TABLE "Owners" (
"owner_id" INT UNIQUE,
PRIMARY KEY ("owner_id")
);

CREATE TABLE "Treatments" (
"treatment_id" INT,
"date_of_treatment" DATETIME,
PRIMARY KEY ("treatment_id")
);





INSERT INTO "Charges" VALUES ("1");
INSERT INTO "Charges" VALUES ("2");
INSERT INTO "Charges" VALUES ("3");
INSERT INTO "Charges" VALUES ("4");
INSERT INTO "Charges" VALUES ("5");
INSERT INTO "Charges" VALUES ("6");
INSERT INTO "Dogs" VALUES ("1", "2023-01-05", "2023-01-10");
INSERT INTO "Dogs" VALUES ("2", "2023-02-15", "2023-02-20");
INSERT INTO "Dogs" VALUES ("3", "2023-03-01", "2023-03-01");
INSERT INTO "Dogs" VALUES ("4", "2023-04-10", "NULL");
INSERT INTO "Dogs" VALUES ("5", "2023-05-20", "2023-05-25");
INSERT INTO "Dogs" VALUES ("6", "2023-06-01", "2023-06-02");
INSERT INTO "Dogs" VALUES ("7", "2023-07-15", "2023-07-15");
INSERT INTO "Dogs" VALUES ("8", "2023-08-01", "NULL");
INSERT INTO "Owners" VALUES ("101");
INSERT INTO "Owners" VALUES ("102");
INSERT INTO "Owners" VALUES ("103");
INSERT INTO "Owners" VALUES ("104");
INSERT INTO "Owners" VALUES ("105");
INSERT INTO "Owners" VALUES ("106");
INSERT INTO "Treatments" VALUES ("1", "2023-01-06");
INSERT INTO "Treatments" VALUES ("2", "2023-02-16");
INSERT INTO "Treatments" VALUES ("3", "2023-03-01");
INSERT INTO "Treatments" VALUES ("4", "2023-04-11");
INSERT INTO "Treatments" VALUES ("5", "2023-05-21");
INSERT INTO "Treatments" VALUES ("6", "2023-06-01");
INSERT INTO "Treatments" VALUES ("7", "2023-07-15");
INSERT INTO "Treatments" VALUES ("8", "2023-08-02");