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 "Friend" (
"student_id" INT,
"friend_id" INT,
PRIMARY KEY ("student_id", "friend_id"),
FOREIGN KEY ("student_id") REFERENCES "Highschooler"("ID"),
FOREIGN KEY ("friend_id") REFERENCES "Highschooler"("ID")
);

CREATE TABLE "Highschooler" (
"ID" INT UNIQUE,
"grade" INT,
PRIMARY KEY ("ID")
);

CREATE TABLE "Likes" (
"student_id" INT,
"liked_id" INT,
PRIMARY KEY ("student_id", "liked_id"),
FOREIGN KEY ("liked_id") REFERENCES "Highschooler"("ID"),
FOREIGN KEY ("student_id") REFERENCES "Highschooler"("ID")
);





INSERT INTO "Highschooler" VALUES ("1", "9");
INSERT INTO "Highschooler" VALUES ("2", "9");
INSERT INTO "Highschooler" VALUES ("3", "9");
INSERT INTO "Highschooler" VALUES ("4", "9");
INSERT INTO "Highschooler" VALUES ("5", "9");
INSERT INTO "Highschooler" VALUES ("6", "10");
INSERT INTO "Highschooler" VALUES ("7", "10");
INSERT INTO "Highschooler" VALUES ("8", "10");
INSERT INTO "Highschooler" VALUES ("9", "10");
INSERT INTO "Highschooler" VALUES ("10", "11");
INSERT INTO "Highschooler" VALUES ("11", "11");
INSERT INTO "Highschooler" VALUES ("12", "11");
INSERT INTO "Highschooler" VALUES ("13", "12");
INSERT INTO "Highschooler" VALUES ("14", "12");
INSERT INTO "Highschooler" VALUES ("15", "12");
INSERT INTO "Highschooler" VALUES ("16", "12");
INSERT INTO "Highschooler" VALUES ("17", "12");
INSERT INTO "Highschooler" VALUES ("18", "12");
INSERT INTO "Highschooler" VALUES ("19", "13");
INSERT INTO "Highschooler" VALUES ("20", "13");
INSERT INTO "Highschooler" VALUES ("21", "13");
INSERT INTO "Highschooler" VALUES ("22", "13");
INSERT INTO "Highschooler" VALUES ("23", "14");
INSERT INTO "Highschooler" VALUES ("24", "14");
INSERT INTO "Highschooler" VALUES ("25", "14");
INSERT INTO "Highschooler" VALUES ("26", "15");
INSERT INTO "Highschooler" VALUES ("27", "15");
INSERT INTO "Highschooler" VALUES ("28", "15");
INSERT INTO "Highschooler" VALUES ("29", "15");
INSERT INTO "Highschooler" VALUES ("30", "15");
INSERT INTO "Friend" VALUES ("1", "2");
INSERT INTO "Friend" VALUES ("2", "3");
INSERT INTO "Friend" VALUES ("3", "4");
INSERT INTO "Friend" VALUES ("4", "5");
INSERT INTO "Friend" VALUES ("6", "7");
INSERT INTO "Friend" VALUES ("7", "8");
INSERT INTO "Friend" VALUES ("8", "9");
INSERT INTO "Friend" VALUES ("10", "11");
INSERT INTO "Friend" VALUES ("11", "12");
INSERT INTO "Friend" VALUES ("13", "14");
INSERT INTO "Friend" VALUES ("14", "15");
INSERT INTO "Friend" VALUES ("15", "16");
INSERT INTO "Friend" VALUES ("16", "17");
INSERT INTO "Friend" VALUES ("18", "19");
INSERT INTO "Friend" VALUES ("19", "20");
INSERT INTO "Friend" VALUES ("20", "21");
INSERT INTO "Friend" VALUES ("21", "22");
INSERT INTO "Friend" VALUES ("23", "24");
INSERT INTO "Friend" VALUES ("24", "25");
INSERT INTO "Friend" VALUES ("26", "27");
INSERT INTO "Friend" VALUES ("27", "28");
INSERT INTO "Friend" VALUES ("28", "29");
INSERT INTO "Friend" VALUES ("29", "30");
INSERT INTO "Likes" VALUES ("1", "3");
INSERT INTO "Likes" VALUES ("2", "4");
INSERT INTO "Likes" VALUES ("3", "5");
INSERT INTO "Likes" VALUES ("6", "8");
INSERT INTO "Likes" VALUES ("7", "9");
INSERT INTO "Likes" VALUES ("10", "12");
INSERT INTO "Likes" VALUES ("11", "13");
INSERT INTO "Likes" VALUES ("13", "15");
INSERT INTO "Likes" VALUES ("14", "16");
INSERT INTO "Likes" VALUES ("18", "20");
INSERT INTO "Likes" VALUES ("19", "21");
INSERT INTO "Likes" VALUES ("23", "25");
INSERT INTO "Likes" VALUES ("24", "26");
INSERT INTO "Likes" VALUES ("26", "28");
INSERT INTO "Likes" VALUES ("27", "29");
INSERT INTO "Likes" VALUES ("28", "30");