#3214: [patch] raw sql file doesn't recognize quotes correctly -------------------------------------+------------------------------------- Reporter: shaunc <shaun@…> | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: master (models, ORM) | Resolution: Severity: Release blocker | Triage Stage: Ready for Keywords: rawsql migrations | checkin Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by claudep): Thanks Aymeric, nice patch! There are however test failures in initial_sql_regress, I had to apply this: {{{ --- a/tests/initial_sql_regress/tests.py +++ b/tests/initial_sql_regress/tests.py @@ -27,7 +27,10 @@ class InitialSQLTests(TestCase): """ connection = connections[DEFAULT_DB_ALIAS] custom_sql = custom_sql_for_model(Simple, no_style(), connection) - self.assertEqual(len(custom_sql), 9) + if connection.features.requires_sqlparse_for_splitting: + self.assertEqual(len(custom_sql), 9) + else: + self.assertEqual(len(custom_sql), 1) with connection.cursor() as cursor: for sql in custom_sql: cursor.execute(sql) }}} Apart from that, I think it's RFC. -- Ticket URL: <https://code.djangoproject.com/ticket/3214#comment:49> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/086.fa925bce3ad5e73ea675af7a80faa016%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.