py-auto-migrate needed a redesign. The refactor removed duplicate code, made the package more extensible, and simplified how users and other tools interact with it.
Why Monitoring Matters
When running a migration, you need three things: monitoring, logging, and a report once the task completes. The dashboard met this need only partially, and the CLI had no monitoring at all. To close this gap, we added the --pgbar option, a logging system, and a completion report for every migration.
Progress Bar
Note: The progress bar slows down the migration, so it is optional and disabled by default.
To enable it, add the --pgbar flag:
py-auto-migrate migrate \
--source "mysql://root:root123@localhost:3306/mysql" \
--target "mongodb://localhost:27017/mydb" \
--pgbar
Handling Duplicate Data
You can also decide whether duplicate data should be stored or skipped. Add the --skip-existing flag to skip data that already exists in the target:
py-auto-migrate migrate \
--source "mysql://root:root123@localhost:3306/mysql" \
--target "mongodb://localhost:27017/mydb" \
--skip-existing
Top comments (1)
tr.ee/dev-to