kaiyan/emote/sqlitestore/schema.sql
2025-04-20 10:45:32 -04:00

18 lines
444 B
SQL

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);