Ticket #16926: fix-also-split-on-carrige-return.diff

File fix-also-split-on-carrige-return.diff, 585 bytes (added by adsworth, 13 years ago)
  • django/core/management/sql.py

    diff --git a/django/core/management/sql.py b/django/core/management/sql.py
    index 8bfdadb..b9b15c8 100644
    a b def custom_sql_for_model(model, style, connection):  
    160160
    161161    # Some backends can't execute more than one SQL statement at a time,
    162162    # so split into separate statements.
    163     statements = re.compile(r";[ \t]*$", re.M)
     163    statements = re.compile(r";[ \t]*(?:$|\r)", re.M)
    164164
    165165    # Find custom SQL, if it's available.
    166166    backend_name = connection.settings_dict['ENGINE'].split('.')[-1]
Back to Top