diff --git a/src/migrator/full_migration.py b/src/migrator/full_migration.py index 07f2c04..6f11054 100644 --- a/src/migrator/full_migration.py +++ b/src/migrator/full_migration.py @@ -71,7 +71,13 @@ class FullMigrator: # - Full restart requires clearing the table previous_migrated_count = self._get_previous_migrated_count(pg_conn, pg_table) - last_completed_partition = self._get_last_completed_partition(pg_conn, pg_table) + # If specific partition requested, ignore migration_state partition tracking + # and start fresh for that partition + if partition: + last_completed_partition = None + logger.info(f"Specific partition {partition} requested - ignoring migration_state partition tracking") + else: + last_completed_partition = self._get_last_completed_partition(pg_conn, pg_table) if previous_migrated_count > 0: pg_row_count = pg_conn.get_row_count(pg_table)