From 8af99a31eae1ba4cf90ea14b0532433d9162b32f Mon Sep 17 00:00:00 2001 From: Michael Zaikin Date: Tue, 26 Nov 2024 18:25:53 +0000 Subject: [PATCH] Ignore non-existent immutable table on schema wipe --- src/dipdup/database.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dipdup/database.py b/src/dipdup/database.py index c0a454203..4c8ec5fd7 100644 --- a/src/dipdup/database.py +++ b/src/dipdup/database.py @@ -352,7 +352,7 @@ async def _pg_drop_schema(conn: AsyncpgClient, name: str) -> None: async def _pg_move_table(conn: AsyncpgClient, name: str, schema: str, new_schema: str) -> None: """Move table from one schema to another""" - await conn.execute_script(f'ALTER TABLE {schema}.{name} SET SCHEMA {new_schema}') + await conn.execute_script(f'ALTER TABLE IF EXISTS {schema}.{name} SET SCHEMA {new_schema}') def prepare_models(package: str | None) -> None: