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 "matches" (
"loser_hand" TEXT,
"winner_hand" TEXT
);

CREATE TABLE "players" (
"player_id" INT UNIQUE,
"hand" TEXT,
PRIMARY KEY ("player_id")
);

CREATE TABLE "rankings" (
"ranking" INT
);





INSERT INTO "players" VALUES ("1", "R");
INSERT INTO "players" VALUES ("2", "L");
INSERT INTO "players" VALUES ("3", "R");
INSERT INTO "players" VALUES ("4", "L");
INSERT INTO "players" VALUES ("5", "R");
INSERT INTO "players" VALUES ("6", "A");
INSERT INTO "players" VALUES ("7", "R");
INSERT INTO "players" VALUES ("8", "L");
INSERT INTO "players" VALUES ("9", "A");
INSERT INTO "players" VALUES ("10", "R");
INSERT INTO "matches" VALUES ("R", "L");
INSERT INTO "matches" VALUES ("L", "R");
INSERT INTO "matches" VALUES ("A", "R");
INSERT INTO "matches" VALUES ("R", "A");
INSERT INTO "matches" VALUES ("L", "A");
INSERT INTO "matches" VALUES ("A", "L");
INSERT INTO "matches" VALUES ("R", "R");
INSERT INTO "matches" VALUES ("L", "L");
INSERT INTO "matches" VALUES ("A", "A");
INSERT INTO "rankings" VALUES ("1");
INSERT INTO "rankings" VALUES ("2");
INSERT INTO "rankings" VALUES ("3");
INSERT INTO "rankings" VALUES ("4");
INSERT INTO "rankings" VALUES ("5");