Files
ColdBreeze-chat-server-rust/migrations/20221217142927_bot_keys.sql
T
2023-03-03 12:03:14 -05:00

13 lines
407 B
SQL

create table bot_key (
id integer primary key autoincrement not null,
uid integer not null,
name string not null,
key string not null,
created_at timestamp not null default current_timestamp,
last_used timestamp,
foreign key (uid) references user (uid) on delete cascade
);
create index bot_key_uid on bot_key (uid);
create unique index bot_key_uid_name on bot_key (uid, name);