mirror of
https://github.com/element-hq/synapse.git
synced 2026-06-03 23:31:27 +00:00
Add a timestamp column to profile_updates
Also add some comments to some fields.
This commit is contained in:
@@ -459,6 +459,7 @@ class ProfileWorkerStore(SQLBaseStore):
|
||||
"instance_name": self._instance_name,
|
||||
"user_id": user_id_str,
|
||||
"field_name": field_name,
|
||||
"inserted_ts": self.clock.time_msec(),
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -16,8 +16,14 @@ CREATE TABLE profile_updates (
|
||||
stream_id BIGINT NOT NULL PRIMARY KEY,
|
||||
instance_name TEXT NOT NULL,
|
||||
|
||||
-- The full user ID
|
||||
user_id TEXT NOT NULL,
|
||||
field_name TEXT NOT NULL
|
||||
-- Profile field name that has been updated,
|
||||
-- see https://spec.matrix.org/unstable/client-server-api/#profiles
|
||||
field_name TEXT NOT NULL,
|
||||
|
||||
-- Unix timestamp for debugging purposes
|
||||
inserted_ts BIGINT NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX profile_updates_by_user ON profile_updates (user_id, stream_id);
|
||||
|
||||
Reference in New Issue
Block a user