While `schema_editor.execute()` could technically be used to execute DML
statements such usage should be uncommon as these are usually performed
through the ORM. In other cases `schema_editor.connection.execute()` can
be used to circumvent this check.
--
Ticket URL: <https://code.djangoproject.com/ticket/27631>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/7737 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/27631#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/27631#comment:2>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/27631#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"813805833aca60544f6b3d686c015039f6af5d1d" 8138058]:
{{{
#!CommitTicketReference repository=""
revision="813805833aca60544f6b3d686c015039f6af5d1d"
Fixed #27631 -- Prevented execution of transactional DDL statements when
unsupported.
Executing a DDL statement during a transaction on backends that don't
support
it silently commits, leaving atomic() in an incoherent state.
While schema_editor.execute() could technically be used to execute DML
statements such usage should be uncommon as these are usually performed
through
the ORM. In other cases schema_editor.connection.execute() can be used to
circumvent this check.
Thanks Adam and Tim for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27631#comment:4>