kopia lustrzana https://github.com/wagtail/wagtail
Fixes bad SQL syntax for _update_descendant_url_paths on Microsoft SQL Server (#2838)
rodzic
43269fd763
commit
ed9758d378
|
@ -603,6 +603,12 @@ class Page(six.with_metaclass(PageBase, MP_Node, index.Indexed, ClusterableModel
|
|||
SET url_path= CONCAT(%s, substring(url_path, %s))
|
||||
WHERE path LIKE %s AND id <> %s
|
||||
"""
|
||||
elif connection.vendor in ('mssql', 'microsoft'):
|
||||
update_statement = """
|
||||
UPDATE wagtailcore_page
|
||||
SET url_path= CONCAT(%s, (SUBSTRING(url_path, 0, %s)))
|
||||
WHERE path LIKE %s AND id <> %s
|
||||
"""
|
||||
else:
|
||||
update_statement = """
|
||||
UPDATE wagtailcore_page
|
||||
|
|
Ładowanie…
Reference in New Issue