Handle CheckConstraint.check -> condition.

Review Request #14743 — Created Dec. 22, 2025 and updated

Information

Django Evolution
master

Reviewers

Django 5.1 renamed the check argument/field inside CheckConstraint
to condition, and 6.0 removed the check argument entirely. This
change adds a support flag and conditions to handle these updates. The
ChangeMeta and ConstraintSignature objects have been updated to
normalize old evolutions and signatures appropriately.

Ran unit tests.

Summary ID
Handle CheckConstraint.check -> condition.
Django 5.1 renamed the `check` argument/field inside `CheckConstraint` to `condition`, and 6.0 removed the `check` argument entirely. This change adds a support flag and conditions to handle these updates. The `ChangeMeta` and `ConstraintSignature` objects have been updated to normalize old evolutions and signatures appropriately. Testing Done: Ran unit tests.
nnsntwsplxpzozktqypmupvyxlqxrqyn
Description From Last Updated

) should be on the next line, with a comma on this line.

chipx86chipx86

This can be one statement.

chipx86chipx86

This can also be one statement.

chipx86chipx86

These, too.

chipx86chipx86

) should be on the next line, with a comma on this line.

chipx86chipx86

This can be one statement.

chipx86chipx86

line too long (81 > 79 characters) Column: 80 Error code: E501

reviewbotreviewbot
chipx86
  1. We'll need to handle evolutions using one form or the other, ensuring the attribute is renamed for the target version of Django.

  2. Show all issues

    ) should be on the next line, with a comma on this line.

  3. django_evolution/tests/test_change_meta.py (Diff revision 1)
     
     
     
     
    Show all issues

    This can be one statement.

  4. django_evolution/tests/test_change_meta.py (Diff revision 1)
     
     
     
     
    Show all issues

    This can also be one statement.

  5. django_evolution/tests/test_change_meta.py (Diff revision 1)
     
     
     
     
     
     
     
     
    Show all issues

    These, too.

  6. Show all issues

    ) should be on the next line, with a comma on this line.

  7. django_evolution/tests/test_signature.py (Diff revision 1)
     
     
     
    Show all issues

    This can be one statement.

  8. 
      
david
Review request changed
Summary:
Handle CheckConstraint.check -> condition
Handle CheckConstraint.check -> condition.
Description:
   

Django 5.1 renamed the check argument/field inside CheckConstraint

    to condition, and 6.0 removed the check argument entirely. This
~   change adds a support flag and conditions to handle these updates.

  ~ change adds a support flag and conditions to handle these updates. The
  + ChangeMeta and ConstraintSignature objects have been updated to
  + normalize old evolutions and signatures appropriately.

Commits:
Summary ID
Handle CheckConstraint.check -> condition
Django 5.1 renamed the `check` argument/field inside `CheckConstraint` to `condition`, and 6.0 removed the `check` argument entirely. This change adds a support flag and conditions to handle these updates. Testing Done: Ran unit tests.
nnsntwsplxpzozktqypmupvyxlqxrqyn
Handle CheckConstraint.check -> condition.
Django 5.1 renamed the `check` argument/field inside `CheckConstraint` to `condition`, and 6.0 removed the `check` argument entirely. This change adds a support flag and conditions to handle these updates. The `ChangeMeta` and `ConstraintSignature` objects have been updated to normalize old evolutions and signatures appropriately. Testing Done: Ran unit tests.
nnsntwsplxpzozktqypmupvyxlqxrqyn

Checks run (1 failed, 1 succeeded)

flake8 failed.
JSHint passed.

flake8

david
Review request changed
Commits:
Summary ID
Handle CheckConstraint.check -> condition.
Django 5.1 renamed the `check` argument/field inside `CheckConstraint` to `condition`, and 6.0 removed the `check` argument entirely. This change adds a support flag and conditions to handle these updates. The `ChangeMeta` and `ConstraintSignature` objects have been updated to normalize old evolutions and signatures appropriately. Testing Done: Ran unit tests.
nnsntwsplxpzozktqypmupvyxlqxrqyn
Handle CheckConstraint.check -> condition.
Django 5.1 renamed the `check` argument/field inside `CheckConstraint` to `condition`, and 6.0 removed the `check` argument entirely. This change adds a support flag and conditions to handle these updates. The `ChangeMeta` and `ConstraintSignature` objects have been updated to normalize old evolutions and signatures appropriately. Testing Done: Ran unit tests.
nnsntwsplxpzozktqypmupvyxlqxrqyn

Checks run (2 succeeded)

flake8 passed.
JSHint passed.