Friends system for app (#2958)

* Friends system for app

* Fix impl issues

* move friends to in-memory store
This commit is contained in:
Geometrically
2024-11-26 18:23:29 -07:00
committed by GitHub
parent 7184c5f5c7
commit 47b0ccdf78
46 changed files with 1078 additions and 539 deletions

View File

@@ -0,0 +1,11 @@
CREATE TABLE friends (
user_id BIGINT NOT NULL REFERENCES users(id),
friend_id BIGINT NOT NULL REFERENCES users(id),
created TIMESTAMPTZ NOT NULL DEFAULT NOW(),
accepted BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (user_id, friend_id)
);
ALTER TABLE users
ADD COLUMN allow_friend_requests BOOLEAN NOT NULL DEFAULT TRUE;