Skip to content

Commit

Permalink
Ignore non-existent immutable table on schema wipe (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus authored Nov 27, 2024
1 parent 9d96252 commit f39bd05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dipdup/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f39bd05

Please sign in to comment.