mirror of https://github.com/usbharu/Hideout.git
feat: notificationsのテーブル定義を追加
This commit is contained in:
parent
7567cd6dcd
commit
cd0a659cd6
|
@ -253,4 +253,20 @@ create table if not exists deleted_actors
|
||||||
public_key varchar(10000) not null,
|
public_key varchar(10000) not null,
|
||||||
deleted_at timestamp not null,
|
deleted_at timestamp not null,
|
||||||
unique ("name", domain)
|
unique ("name", domain)
|
||||||
|
);
|
||||||
|
|
||||||
|
create table if not exists notifications
|
||||||
|
(
|
||||||
|
id bigint primary key,
|
||||||
|
type varchar(100) not null,
|
||||||
|
user_id bigint not null,
|
||||||
|
source_actor_id bigint null,
|
||||||
|
post_id bigint null,
|
||||||
|
text varchar(3000) null,
|
||||||
|
reaction_id bigint null,
|
||||||
|
created_at timestamp not null,
|
||||||
|
constraint fk_notifications_user_id__id foreign key (user_id) references actors (id) on delete cascade on update cascade,
|
||||||
|
constraint fk_notifications_source_actor__id foreign key (source_actor_id) references actors (id) on delete cascade on update cascade,
|
||||||
|
constraint fk_notifications_post_id__id foreign key (post_id) references posts (id) on delete cascade on update cascade,
|
||||||
|
constraint fk_notifications_reaction_id__id foreign key (reaction_id) references reactions (id) on delete cascade on update cascade
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue