1
0
mirror of https://github.com/django/django.git synced 2025-03-03 21:55:04 +00:00
Simon Charette 813805833a 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.
2016-12-28 19:43:32 -05:00
..
2016-11-14 12:30:46 -05:00
2015-08-22 20:25:42 +02:00
2016-11-14 12:30:46 -05:00
2015-08-22 20:25:42 +02:00
2016-11-14 12:30:46 -05:00
2016-11-14 12:30:46 -05:00
2016-11-14 12:30:46 -05:00

To run the test suite, first, create and activate a virtual environment. Then
install some requirements and run the tests::

    $ cd tests
    $ pip install -e ..
    $ pip install -r requirements/py3.txt  # or py2.txt
    $ ./runtests.py

For more information about the test suite, see
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/.