nxy/schema.sql

41 lines
1.1 KiB
MySQL
Raw Normal View History

2017-05-16 05:45:10 +00:00
create table if not exists quotes (
id integer primary key autoincrement,
2017-05-29 16:44:26 +00:00
nick text not null collate nocase,
item text not null collate nocase,
unique (nick, item)
2017-05-16 05:45:10 +00:00
);
2017-05-16 10:06:29 +00:00
create table if not exists mcmaniacs (
2017-05-16 05:45:10 +00:00
id integer primary key autoincrement,
2017-05-29 16:44:26 +00:00
item text not null collate nocase,
unique (item) on conflict replace
2017-05-16 05:45:10 +00:00
);
2017-05-16 10:06:29 +00:00
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
);
2017-05-16 16:34:29 +00:00
create table if not exists tells (
id integer primary key autoincrement,
from_user text not null,
to_user text not null,
2017-05-16 16:34:29 +00:00
message text not null,
2017-05-28 10:27:38 +00:00
created timestamp not null default current_timestamp,
unique (to_user, message)
2017-05-16 16:34:29 +00:00
);
2017-05-29 12:39:48 +00:00
create table if not exists seens (
id integer primary key autoincrement,
2017-05-29 16:44:26 +00:00
nick text not null collate nocase,
channel text not null collate nocase,
2017-05-29 12:39:48 +00:00
message text not null,
last_seen timestamp not null,
2017-05-29 16:44:26 +00:00
unique (nick) on conflict replace
2017-05-29 12:39:48 +00:00
);