fix(migrations): lift timescale decompression limit when dropping scheduled dupes
This commit is contained in:
@@ -57,8 +57,13 @@ WHERE cs.account_id = fresh.account_id AND cs.chat_id = fresh.chat_id
|
|||||||
|
|
||||||
_CHILD_TABLES = ("media", "media_versions", "message_versions", "links", "callbacks")
|
_CHILD_TABLES = ("media", "media_versions", "message_versions", "links", "callbacks")
|
||||||
|
|
||||||
|
_ALLOW_DECOMPRESSION = (
|
||||||
|
"SET LOCAL timescaledb.max_tuples_decompressed_per_dml_transaction = 0"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def upgrade() -> None:
|
def upgrade() -> None:
|
||||||
|
op.execute(_ALLOW_DECOMPRESSION)
|
||||||
op.execute(_STAGE)
|
op.execute(_STAGE)
|
||||||
for table in _CHILD_TABLES:
|
for table in _CHILD_TABLES:
|
||||||
op.execute(_DELETE_CHILD.format(table=table))
|
op.execute(_DELETE_CHILD.format(table=table))
|
||||||
|
|||||||
Reference in New Issue
Block a user