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,
"name" TEXT,
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", "Alice");
INSERT INTO "Highschooler" VALUES ("2", "Bob");
INSERT INTO "Highschooler" VALUES ("3", "Charlie");
INSERT INTO "Highschooler" VALUES ("4", "Diana");
INSERT INTO "Highschooler" VALUES ("5", "Eve");
INSERT INTO "Highschooler" VALUES ("6", "Frank");
INSERT INTO "Highschooler" VALUES ("7", "Grace");
INSERT INTO "Highschooler" VALUES ("8", "Hank");
INSERT INTO "Highschooler" VALUES ("9", "Ivy");
INSERT INTO "Highschooler" VALUES ("10", "Jack");
INSERT INTO "Friend" VALUES ("1", "2");
INSERT INTO "Friend" VALUES ("2", "1");
INSERT INTO "Friend" VALUES ("1", "3");
INSERT INTO "Friend" VALUES ("3", "1");
INSERT INTO "Friend" VALUES ("1", "4");
INSERT INTO "Friend" VALUES ("4", "1");
INSERT INTO "Friend" VALUES ("1", "5");
INSERT INTO "Friend" VALUES ("5", "1");
INSERT INTO "Friend" VALUES ("2", "3");
INSERT INTO "Friend" VALUES ("3", "2");
INSERT INTO "Friend" VALUES ("2", "6");
INSERT INTO "Friend" VALUES ("6", "2");
INSERT INTO "Friend" VALUES ("3", "7");
INSERT INTO "Friend" VALUES ("7", "3");
INSERT INTO "Friend" VALUES ("4", "8");
INSERT INTO "Friend" VALUES ("8", "4");
INSERT INTO "Friend" VALUES ("5", "9");
INSERT INTO "Friend" VALUES ("9", "5");
INSERT INTO "Friend" VALUES ("6", "10");
INSERT INTO "Friend" VALUES ("10", "6");
INSERT INTO "Friend" VALUES ("1", "6");
INSERT INTO "Friend" VALUES ("6", "1");
INSERT INTO "Friend" VALUES ("1", "7");
INSERT INTO "Friend" VALUES ("7", "1");
INSERT INTO "Likes" VALUES ("1", "2");
INSERT INTO "Likes" VALUES ("2", "1");
INSERT INTO "Likes" VALUES ("3", "1");
INSERT INTO "Likes" VALUES ("4", "1");
INSERT INTO "Likes" VALUES ("5", "1");
INSERT INTO "Likes" VALUES ("6", "1");
INSERT INTO "Likes" VALUES ("7", "1");
INSERT INTO "Likes" VALUES ("8", "1");
INSERT INTO "Likes" VALUES ("9", "1");
INSERT INTO "Likes" VALUES ("10", "1");
INSERT INTO "Likes" VALUES ("2", "3");
INSERT INTO "Likes" VALUES ("3", "2");
INSERT INTO "Likes" VALUES ("4", "5");
INSERT INTO "Likes" VALUES ("5", "4");
INSERT INTO "Likes" VALUES ("6", "7");
INSERT INTO "Likes" VALUES ("7", "6");