nxy/schema.sql
2017-05-28 12:27:38 +02:00

32 lines
854 B
SQL

create table if not exists quotes (
id integer primary key autoincrement,
nick text not null,
item text not null,
unique (nick, item collate nocase)
);
create table if not exists mcmaniacs (
id integer primary key autoincrement,
item text not null,
unique (item collate nocase) 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)
);