Skip to content

Commit 4e50ed8

Browse files
authored
Fix query-rewriting for Django 6.1 (#1199)
Missed in #1197. Django now always quotes table identifiers, so we need to support this syntax.
1 parent 189d11f commit 4e50ed8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/django_mysql/rewrite_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def modify_sql(
171171
table_spec_re_template = r"""
172172
\b(?P<operator>FROM|JOIN)
173173
\s+
174-
(?P<table_name_with_alias>{table_name}(\s+[A-Z]+[0-9]+)?)
174+
(?P<table_name_with_alias>{table_name}(\s+(`[^`]+`|[A-Z]+[0-9]+))?)
175175
\s+
176176
"""
177177

0 commit comments

Comments
 (0)