BEGIN TRANSACTION;
DROP TABLE IF EXISTS "vipUsers";
DROP TABLE IF EXISTS "sponsorTimes";
DROP TABLE IF EXISTS "userNames";

CREATE TABLE IF NOT EXISTS "vipUsers" (
	"userID"	TEXT NOT NULL
);
CREATE TABLE IF NOT EXISTS "sponsorTimes" (
	"videoID"	TEXT NOT NULL,
	"startTime"	REAL NOT NULL,
	"endTime"	REAL NOT NULL,
	"votes"	INTEGER NOT NULL,
	"UUID"	TEXT NOT NULL UNIQUE,
	"userID"	TEXT NOT NULL,
	"timeSubmitted"	INTEGER NOT NULL,
	"views"	INTEGER NOT NULL,
	"shadowHidden"	INTEGER NOT NULL
);
CREATE TABLE IF NOT EXISTS "userNames" (
	"userID"	TEXT NOT NULL,
	"userName"	TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS sponsorTimes_videoID on sponsorTimes(videoID);
CREATE INDEX IF NOT EXISTS sponsorTimes_UUID on sponsorTimes(UUID);
COMMIT;