BezBartek / django-db-views

Creating automatic migrations for Views models witch working reverse and full command options like in normal makemigrations
MIT License
60 stars 12 forks source link

TransactionManagementError fix #4

Closed kigawas closed 4 years ago

kigawas commented 4 years ago

  File "/home/ryan/project/venv/lib/python3.7/site-packages/django_db_views/migration_functions.py", line 16, in __call__
    schema_editor.execute("DROP VIEW IF EXISTS %s;" % self.table_name)
  File "/home/ryan/project/venv/lib/python3.7/site-packages/django/db/backends/base/schema.py", line 127, in execute
    "Executing DDL statements while in a transaction on databases "
django.db.transaction.TransactionManagementError: Executing DDL statements while in a transaction on databases that can't perform a rollback is prohibited.

This will occur on Django 3

BezBartek commented 4 years ago

Thank you :)