PRAGMA journal_mode = WAL;

CREATE TABLE IF NOT EXISTS emote (
	channel TEXT NOT NULL,
	message TEXT NOT NULL,
	time INTEGER NOT NULL,
	sender TEXT NOT NULL,
	id TEXT NOT NULL,
	-- The following columns could be normalized in a separate table,
	-- but they're here for simplicity.
	name TEXT NOT NULL,
	source TEXT NOT NULL,
	link TEXT NOT NULL,
	image TEXT NOT NULL
) STRICT;

CREATE INDEX IF NOT EXISTS channel_time ON emote (channel, time);
