Django-pg-migration-tools

Latest version: v0.1.18

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

Scan your dependencies

Page 1 of 4

0.1.18

Fixed

- `SaferAlterFieldSetNotNull` did not work when the field dropping the NOT NULL
constraint was a ForeignKey. An error such as:
`django.db.utils.ProgrammingError: column "foo" does not exist` would have
been raised instead.

0.1.17

Added

- Enhanced `SaferAddUniqueConstraint` to support a `UniqueConstraint` with the
`deferrable` argument.
- A new operation to remove a foreign key field: `SaferRemoveFieldForeignKey`.
- A new operation `SaferRemoveCheckConstraint` which does the opposite of
`SaferAddCheckConstraint`.

0.1.16

Added

- A new type of index `UniqueIndex` that also accepts conditions.
- A new operation to add one-to-one fields in a safer way:
`SaferAddFieldOneToOne`.

0.1.15

Changed

- The `migrate_with_timeouts` command now acquires a session-level advisory
lock before it begins. This helps preventing concurrent instances of the
migrate command from running at the same time, which could cause unexpected
crashes.

0.1.14

Added

- A new operation to add a check constraint to an existing table has been
added: `SaferAddCheckConstraint`.

Fixed

- Introspection queries are now skipped when running `sqlmigrate`. The result
of the `sqlmigrate` command will instead show a best-effort plan to perform
the migration without knowing the current state of the database. When running
`migrate`, however, the introspection queries will find the most adequate
plan; taking into consideration idempotency and reentrancy.

0.1.13

Fixed

- Use `schema_editor` instead of opening a new cursor for executing DDL
queries. This is so that `sqlmigrate` can show the queries without actually
running them.

Page 1 of 4

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.