mirror of https://github.com/usbharu/Hideout.git
feat: reactionのテーブル定義を追加
This commit is contained in:
parent
daf676503d
commit
1b4dbc8566
|
@ -76,7 +76,7 @@ fun ResultRow.toReaction(): Reaction {
|
|||
|
||||
}
|
||||
|
||||
object Reactions : Table("Reactions") {
|
||||
object Reactions : Table("reactions") {
|
||||
val id = long("id")
|
||||
val postId = long("post_id").references(Posts.id)
|
||||
val actorId = long("actor_id").references(Actors.id)
|
||||
|
|
|
@ -318,4 +318,16 @@ create table if not exists filter_keywords
|
|||
keyword varchar(1000) not null,
|
||||
mode varchar(100) not null,
|
||||
constraint fk_filter_keywords_filter_id__id foreign key (filter_id) references filters (id) on delete cascade on update cascade
|
||||
)
|
||||
);
|
||||
|
||||
create table if not exists reactions
|
||||
(
|
||||
id bigint primary key,
|
||||
post_id bigint not null,
|
||||
actor_id bigint not null,
|
||||
custom_emoji_id bigint null,
|
||||
unicode_emoji varchar(100) not null,
|
||||
created_at timestamp not null,
|
||||
constraint fk_reactions_post_id__id foreign key (post_id) references posts (id) on delete cascade on update cascade,
|
||||
constraint fk_reactions_actor_id__id foreign key (actor_id) references actors (id) on delete cascade on update cascade
|
||||
);
|
Loading…
Reference in New Issue