Skip to content

Conversation

@marcelofern
Copy link
Contributor

The message in ConstraintAlreadyExists was following the old argument skip_if_exists - which doesn't exist in the current master. This commit fixes that message to use raise_if_exists instead.

The behaviour of this is tested on:

  • test_do_nothing_when_asked_not_to_raise_when_constraint_exists
  • test_raises_if_constraint_already_exists

In TestSaferAddUniqueConstraint.

The message in ConstraintAlreadyExists was following the old argument
skip_if_exists - which doesn't exist in the current master. This commit
fixes that message to use raise_if_exists instead.

The behaviour of this is tested on:
- test_do_nothing_when_asked_not_to_raise_when_constraint_exists
- test_raises_if_constraint_already_exists

In TestSaferAddUniqueConstraint.
@github-actions
Copy link

Coverage Report Results

Name Stmts Miss Branch BrPart Cover
src/django_pg_migration_tools/indexes.py 9 0 0 0 100%
src/django_pg_migration_tools/management/commands/migrate_with_timeouts.py 138 0 20 0 100%
src/django_pg_migration_tools/operations.py 453 0 90 0 100%
src/django_pg_migration_tools/timeouts.py 73 0 30 0 100%
tests/django_pg_migration_tools/management/commands/test_migrate_with_timeouts.py 126 0 0 0 100%
tests/django_pg_migration_tools/test_indexes.py 33 0 0 0 100%
tests/django_pg_migration_tools/test_operations.py 1740 0 0 0 100%
tests/django_pg_migration_tools/test_package.py 3 0 0 0 100%
tests/django_pg_migration_tools/test_timeouts.py 75 0 0 0 100%
TOTAL 2650 0 140 0 100%

6 empty files skipped.

@marcelofern marcelofern merged commit fc0978c into main Jul 17, 2025
11 checks passed
@marcelofern marcelofern deleted the update_constraint_already_exists_error branch July 17, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants