nxy/schema.sql
2017-05-29 18:44:26 +02:00

41 lines
1.1 KiB
SQL

create table if not exists quotes (
id integer primary key autoincrement,
nick text not null collate nocase,
item text not null collate nocase,
unique (nick, item)
);
create table if not exists mcmaniacs (
id integer primary key autoincrement,
item text not null collate nocase,
unique (item) on conflict replace
);
create table if not exists timers (
id integer primary key autoincrement,
mask text not null,
channel text not null,
message text not null,
delay text not null,
until timestamp not null,
created timestamp not null default current_timestamp
);
create table if not exists tells (
id integer primary key autoincrement,
from_user text not null,
to_user text not null,
message text not null,
created timestamp not null default current_timestamp,
unique (to_user, message)
);
create table if not exists seens (
id integer primary key autoincrement,
nick text not null collate nocase,
channel text not null collate nocase,
message text not null,
last_seen timestamp not null,
unique (nick) on conflict replace
);