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 "AREA_CODE_STATE" (
"area_code" INT,
PRIMARY KEY ("area_code")
);

CREATE TABLE "CONTESTANTS" (
"contestant_number" INT UNIQUE,
PRIMARY KEY ("contestant_number")
);

CREATE TABLE "VOTES" (
"vote_id" INT,
"phone_number" INT,
"state" VARCHAR(2),
PRIMARY KEY ("vote_id")
);





INSERT INTO "AREA_CODE_STATE" VALUES ("201");
INSERT INTO "AREA_CODE_STATE" VALUES ("305");
INSERT INTO "AREA_CODE_STATE" VALUES ("415");
INSERT INTO "AREA_CODE_STATE" VALUES ("212");
INSERT INTO "AREA_CODE_STATE" VALUES ("718");
INSERT INTO "AREA_CODE_STATE" VALUES ("650");
INSERT INTO "AREA_CODE_STATE" VALUES ("909");
INSERT INTO "AREA_CODE_STATE" VALUES ("999");
INSERT INTO "AREA_CODE_STATE" VALUES ("100");
INSERT INTO "AREA_CODE_STATE" VALUES ("123");
INSERT INTO "CONTESTANTS" VALUES ("1");
INSERT INTO "CONTESTANTS" VALUES ("2");
INSERT INTO "CONTESTANTS" VALUES ("3");
INSERT INTO "CONTESTANTS" VALUES ("4");
INSERT INTO "CONTESTANTS" VALUES ("5");
INSERT INTO "VOTES" VALUES ("1", "2015551234", "NY");
INSERT INTO "VOTES" VALUES ("2", "3055555678", "FL");
INSERT INTO "VOTES" VALUES ("3", "4155559012", "CA");
INSERT INTO "VOTES" VALUES ("4", "2125553456", "NY");
INSERT INTO "VOTES" VALUES ("5", "7185557890", "NY");
INSERT INTO "VOTES" VALUES ("6", "6505552345", "CA");
INSERT INTO "VOTES" VALUES ("7", "9095556789", "CA");
INSERT INTO "VOTES" VALUES ("8", "9995554321", "TX");
INSERT INTO "VOTES" VALUES ("9", "1005558765", "TX");
INSERT INTO "VOTES" VALUES ("10", "1235553456", "TX");