diff --git a/backend/migrations/versions/e1c7a4b62d90_drop_scheduled_duplicates.py b/backend/migrations/versions/e1c7a4b62d90_drop_scheduled_duplicates.py index 2760dde..874c6a0 100644 --- a/backend/migrations/versions/e1c7a4b62d90_drop_scheduled_duplicates.py +++ b/backend/migrations/versions/e1c7a4b62d90_drop_scheduled_duplicates.py @@ -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") +_ALLOW_DECOMPRESSION = ( + "SET LOCAL timescaledb.max_tuples_decompressed_per_dml_transaction = 0" +) + def upgrade() -> None: + op.execute(_ALLOW_DECOMPRESSION) op.execute(_STAGE) for table in _CHILD_TABLES: op.execute(_DELETE_CHILD.format(table=table))