You've already forked AstralRinth
forked from didirus/AstralRinth
Follows (#172)
* Follows initial * Fix #171, Fix #170, Fix #169, Fix #164 * More work on follows * Fix compile error * Upgrade meili version, add follows to search
This commit is contained in:
17
migrations/20210224174945_notifications.sql
Normal file
17
migrations/20210224174945_notifications.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- Add migration script here
|
||||
CREATE TABLE notifications (
|
||||
id bigint PRIMARY KEY,
|
||||
user_id bigint REFERENCES users NOT NULL,
|
||||
title varchar(255) NOT NULL,
|
||||
text varchar(2048) NOT NULL,
|
||||
link varchar(2048) NOT NULL,
|
||||
created timestamptz DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
read boolean DEFAULT FALSE NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE notifications_actions (
|
||||
id serial PRIMARY KEY,
|
||||
notification_id bigint REFERENCES notifications NOT NULL,
|
||||
title varchar(255) NOT NULL,
|
||||
action_route varchar(2048) NOT NULL
|
||||
);
|
||||
9
migrations/20210301041252_follows.sql
Normal file
9
migrations/20210301041252_follows.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE mod_follows(
|
||||
follower_id bigint REFERENCES users NOT NULL,
|
||||
mod_id bigint REFERENCES mods NOT NULL,
|
||||
created timestamptz DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
PRIMARY KEY (follower_id, mod_id)
|
||||
);
|
||||
|
||||
ALTER TABLE mods
|
||||
ADD COLUMN follows integer NOT NULL default 0;
|
||||
Reference in New Issue
Block a user