mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-08 17:22:14 -04:00
keep 'origin_server_ts' as 'ts' in the database to avoid needlessly updating schema
This commit is contained in:
parent
f5cf7ac25b
commit
82c5820767
8 changed files with 18 additions and 13 deletions
|
@ -354,6 +354,7 @@ class SQLBaseStore(object):
|
|||
d.pop("stream_ordering", None)
|
||||
d.pop("topological_ordering", None)
|
||||
d.pop("processed", None)
|
||||
d["origin_server_ts"] = d.pop("ts", 0)
|
||||
|
||||
d.update(json.loads(row_dict["unrecognized_keys"]))
|
||||
d["content"] = json.loads(d["content"])
|
||||
|
@ -361,7 +362,7 @@ class SQLBaseStore(object):
|
|||
|
||||
if "age_ts" not in d:
|
||||
# For compatibility
|
||||
d["age_ts"] = d["origin_server_ts"] if "origin_server_ts" in d else 0
|
||||
d["age_ts"] = d.get("origin_server_ts", 0)
|
||||
|
||||
return self.event_factory.create_event(
|
||||
etype=d["type"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue