(core): Add member name caching.

This commit is contained in:
2022-01-20 12:12:17 +02:00
parent b21224812e
commit 4a67736adc
6 changed files with 68 additions and 8 deletions

View File

@@ -73,4 +73,15 @@ AS $$
$$ LANGUAGE PLPGSQL;
-- }}}
ALTER TABLE user_config
ADD COLUMN avatar_hash TEXT;
ALTER TABLE guild_config
ADD COLUMN name TEXT;
ALTER TABLE members
ADD COLUMN display_name TEXT;
INSERT INTO VersionHistory (version, author) VALUES (9, 'v8-v9 migration');

View File

@@ -42,7 +42,8 @@ CREATE TABLE global_guild_blacklist(
CREATE TABLE user_config(
userid BIGINT PRIMARY KEY,
timezone TEXT,
topgg_vote_reminder
topgg_vote_reminder,
avatar_hash TEXT
);
-- }}}
@@ -80,7 +81,8 @@ CREATE TABLE guild_config(
starting_funds INTEGER,
persist_roles BOOLEAN,
daily_study_cap INTEGER,
pomodoro_channel BIGINT
pomodoro_channel BIGINT,
name TEXT
);
CREATE TABLE ignored_members(
@@ -405,6 +407,7 @@ CREATE TABLE members(
last_workout_start TIMESTAMP,
last_study_badgeid INTEGER REFERENCES study_badges ON DELETE SET NULL,
video_warned BOOLEAN DEFAULT FALSE,
display_name TEXT,
_timestamp TIMESTAMP DEFAULT (now() at time zone 'utc'),
PRIMARY KEY(guildid, userid)
);