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 "Student_Enrolment_Courses" (
"student_course_id" INT,
"course_id" INT,
PRIMARY KEY ("student_course_id")
);

CREATE TABLE "Students" (
"student_id" INT,
PRIMARY KEY ("student_id")
);

CREATE TABLE "Transcript_Contents" (
"student_course_id" INT,
FOREIGN KEY ("student_course_id") REFERENCES "Student_Enrolment_Courses"("student_course_id")
);

CREATE TABLE "Transcripts" (
"transcript_id" INT UNIQUE,
"transcript_date" DATETIME,
PRIMARY KEY ("transcript_id")
);





INSERT INTO "Student_Enrolment_Courses" VALUES ("1", "101");
INSERT INTO "Student_Enrolment_Courses" VALUES ("2", "102");
INSERT INTO "Student_Enrolment_Courses" VALUES ("3", "101");
INSERT INTO "Student_Enrolment_Courses" VALUES ("4", "103");
INSERT INTO "Student_Enrolment_Courses" VALUES ("5", "102");
INSERT INTO "Students" VALUES ("1001");
INSERT INTO "Students" VALUES ("1002");
INSERT INTO "Students" VALUES ("1003");
INSERT INTO "Students" VALUES ("1004");
INSERT INTO "Students" VALUES ("1005");
INSERT INTO "Transcript_Contents" VALUES ("1");
INSERT INTO "Transcript_Contents" VALUES ("2");
INSERT INTO "Transcript_Contents" VALUES ("3");
INSERT INTO "Transcript_Contents" VALUES ("4");
INSERT INTO "Transcript_Contents" VALUES ("5");
INSERT INTO "Transcripts" VALUES ("100", "2023-01-15 10:00:00");
INSERT INTO "Transcripts" VALUES ("101", "2023-01-15 11:00:00");
INSERT INTO "Transcripts" VALUES ("102", "2023-01-16 09:30:00");
INSERT INTO "Transcripts" VALUES ("103", "2023-01-17 14:00:00");
INSERT INTO "Transcripts" VALUES ("104", "2023-01-17 15:30:00");
INSERT INTO "Transcripts" VALUES ("105", "2023-01-18 10:00:00");
INSERT INTO "Transcripts" VALUES ("106", "2023-01-18 11:00:00");
INSERT INTO "Transcripts" VALUES ("107", "2023-01-19 09:30:00");
INSERT INTO "Transcripts" VALUES ("108", "2023-01-20 14:00:00");
INSERT INTO "Transcripts" VALUES ("109", "2023-01-20 15:30:00");