48 lines
1.3 KiB
SQL
48 lines
1.3 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
|
|
);
|
|
|
|
create table if not exists owes (
|
|
id integer primary key autoincrement,
|
|
nick text not null collate nocase,
|
|
amount integer not null,
|
|
unique (nick) on conflict ignore
|
|
);
|