mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
[1.7.x] Fixed #3214 -- Stopped parsing SQL with regex.
Avoided introducing a new regex-based SQL splitter in the migrations
framework, before we're bound by backwards compatibility.
Adapted this change to the legacy "initial SQL data" feature, even
though it's already deprecated, in order to facilitate the transition
to migrations.
sqlparse becomes mandatory for RunSQL on some databases (all but
PostgreSQL). There's no API to provide a single statement and tell
Django not to attempt splitting. Since we have a more robust splitting
implementation, that seems like a good tradeoff. It's easier to add a
new keyword argument later if necessary than to remove one.
Many people contributed to both tickets, thank you all, and especially
Claude for the review.
Refs #22401.
Backport of 8b5b199
from master
This commit is contained in:
parent
22d99200a1
commit
3bb0f118ca
11 changed files with 77 additions and 38 deletions
|
@ -166,6 +166,7 @@ dependencies:
|
|||
* memcached_, plus a :ref:`supported Python binding <memcached>`
|
||||
* gettext_ (:ref:`gettext_on_windows`)
|
||||
* selenium_
|
||||
* sqlparse_
|
||||
|
||||
You can find these dependencies in `pip requirements files`_ inside the
|
||||
``tests/requirements`` directory of the Django source tree and install them
|
||||
|
@ -197,6 +198,7 @@ associated tests will be skipped.
|
|||
.. _memcached: http://memcached.org/
|
||||
.. _gettext: http://www.gnu.org/software/gettext/manual/gettext.html
|
||||
.. _selenium: https://pypi.python.org/pypi/selenium
|
||||
.. _sqlparse: https://pypi.python.org/pypi/sqlparse
|
||||
.. _pip requirements files: http://www.pip-installer.org/en/latest/cookbook.html#requirements-files
|
||||
|
||||
Code coverage
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue