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 "Examination" (
"Examination Date" DATE,
"Diagnosis" TEXT
);

CREATE TABLE "Patient" (
"ID" INT UNIQUE,
"SEX" TEXT,
"Birthday" DATE,
"First Date" DATE,
"Diagnosis" TEXT,
PRIMARY KEY ("ID")
);



INSERT INTO "Patient" VALUES ("1", "F", "1980-01-15", "2010-05-20", "RA");
INSERT INTO "Patient" VALUES ("2", "M", "1980-06-30", "2011-07-15", "RA");
INSERT INTO "Patient" VALUES ("3", "F", "1980-12-05", "2012-03-10", "RA");
INSERT INTO "Patient" VALUES ("4", "F", "1980-08-22", "2013-11-25", "OA");
INSERT INTO "Patient" VALUES ("5", "M", "1979-04-18", "2010-01-05", "RA");
INSERT INTO "Patient" VALUES ("6", "F", "1980-03-10", "2014-06-30", "RA");
INSERT INTO "Patient" VALUES ("7", "M", "1981-09-12", "2015-09-01", "RA");
INSERT INTO "Patient" VALUES ("8", "F", "1980-07-07", "2016-02-20", "OA");
INSERT INTO "Patient" VALUES ("9", "M", "1980-11-11", "2017-08-15", "RA");
INSERT INTO "Patient" VALUES ("10", "F", "1980-05-25", "2018-12-05", "RA");
INSERT INTO "Examination" VALUES ("2010-05-20", "RA");
INSERT INTO "Examination" VALUES ("2011-07-15", "RA");
INSERT INTO "Examination" VALUES ("2012-03-10", "RA");
INSERT INTO "Examination" VALUES ("2013-11-25", "OA");
INSERT INTO "Examination" VALUES ("2010-01-05", "RA");
INSERT INTO "Examination" VALUES ("2014-06-30", "RA");
INSERT INTO "Examination" VALUES ("2015-09-01", "RA");
INSERT INTO "Examination" VALUES ("2016-02-20", "OA");
INSERT INTO "Examination" VALUES ("2017-08-15", "RA");
INSERT INTO "Examination" VALUES ("2018-12-05", "RA");