ibmdb / python-ibmdb-django

IBM DB2 Driver for the Django application Framework
Apache License 2.0
29 stars 42 forks source link

Default to atomic transaction for migrations #98

Closed GuerrettaG closed 10 months ago

GuerrettaG commented 10 months ago

This will set the default behavior when running a migration. See: https://github.com/django/django/blob/d22ba0763086f71fb6df8502162ea63944d166b1/django/db/migrations/migration.py#L123-L134 and https://github.com/django/django/blob/d22ba0763086f71fb6df8502162ea63944d166b1/django/db/backends/postgresql/features.py#L30C2-L30C2 For the example in the default postgres driver.

praveen-db2 commented 10 months ago

@GuerrettaG thanks for your contribution. What version of Django supports can_rollback_ddl ? And have you tested this ?

GuerrettaG commented 10 months ago

It is supported at least from Django > 2.2.0. I have tested by manually running migrations and reverting them on an empty DB2 schema.