diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2022-09-15 14:28:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 18:28:48 +0000 |
commit | b2b0c8527957d89b36c0eafea70347c200c1d294 (patch) | |
tree | 27fc59a15ef8dc106d2aa5842907d9d741a0c108 /synapse/storage/background_updates.py | |
parent | A third batch of Pydantic validation for rest/client/account.py (#13736) (diff) | |
download | synapse-b2b0c8527957d89b36c0eafea70347c200c1d294.tar.xz |
Support providing an index predicate for upserts. (#13822)
This is useful to upsert against a table which has a unique partial index while avoiding conflicts.
Diffstat (limited to 'synapse/storage/background_updates.py')
-rw-r--r-- | synapse/storage/background_updates.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/storage/background_updates.py b/synapse/storage/background_updates.py index cf1eabc437..bf5e7ee7be 100644 --- a/synapse/storage/background_updates.py +++ b/synapse/storage/background_updates.py @@ -533,6 +533,7 @@ class BackgroundUpdater: index_name: name of index to add table: table to add index to columns: columns/expressions to include in index + where_clause: A WHERE clause to specify a partial unique index. unique: true to make a UNIQUE index psql_only: true to only create this index on psql databases (useful for virtual sqlite tables) |