mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-27 21:31:31 +00:00
6bc49bdd70
* Add Custom Emojis * Modify index
19 lines
671 B
SQL
19 lines
671 B
SQL
create table custom_emoji (
|
|
id serial primary key,
|
|
local_site_id int references local_site on update cascade on delete cascade not null,
|
|
shortcode varchar(128) not null UNIQUE,
|
|
image_url text not null UNIQUE,
|
|
alt_text text not null,
|
|
category text not null,
|
|
published timestamp without time zone default now() not null,
|
|
updated timestamp without time zone
|
|
);
|
|
|
|
create table custom_emoji_keyword (
|
|
id serial primary key,
|
|
custom_emoji_id int references custom_emoji on update cascade on delete cascade not null,
|
|
keyword varchar(128) not null,
|
|
UNIQUE (custom_emoji_id, keyword)
|
|
);
|
|
|
|
create index idx_custom_emoji_category on custom_emoji (id,category);
|