Django-pg-migration-tools

Latest version: v0.1.18

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

0.1.6

Changed

- `migrate_with_timeouts` callbacks can now access the migration stdout via
`RetryState.stdout` and the time since the migration started with
`RetryState.time_since_start`.
- Added a new operation `SaferAddUniqueConstraint` that provides a way to
safely create unique constraints.

0.1.5

Changed

- `migrate_with_timeouts` will now raise `MaximumRetriesReached` instead of
`CommandError` when the maximum number of retries is reached.

0.1.4

Changed

- The implementation of `migrate_with_timeouts` now has additional flags to
perform retries:
bash
./manage.py migrate_with_timeouts \
--lock-timeout-in-ms=10000 \
--lock-timeout-max-retries=3 \
--lock-timeout-retry-exp=2 \
--lock-timeout-retry-min-wait-in-ms=3000 \
--lock-timeout-retry-max-wait-in-ms=10000 \
--statement-timeout-in-ms=10000 \
--retry-callback-path="dotted.path.to.callback.function"

0.1.3

Added

- `SaferRemoveIndexConcurrently` migration operation to drop Postgres indexes
in a safer way than Django's `RemoveIndexConcurrently`.

Changed

- The internal implementation for `SaferAddIndexConcurrently` has been changed
to inherit from Django's `AddIndexConcurrently` operation rather than
Django's `Operation` class. This means that the interface is now the same and
the "hints" argument is not valid any longer.

0.1.2

- Fixes a bug where the `SaferAddIndexConcurrently` class would try to perform
a migration regardless of whether the router would allow it (through
`router.allow_migrate`).

0.1.1

- Non-functional changes for the documentation to be properly linked in PyPI.

Page 3 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.