mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-30 01:46:24 +01:00
Add @kryton's fix for MySQL support in _update_descendant_url_paths, from #215
This commit is contained in:
parent
419b671fcc
commit
ba339a0bfb
@ -312,6 +312,12 @@ class Page(MP_Node, ClusterableModel, Indexed):
|
||||
SET url_path = %s || substr(url_path, %s)
|
||||
WHERE path LIKE %s AND id <> %s
|
||||
"""
|
||||
elif connection.vendor == 'mysql':
|
||||
update_statement = """
|
||||
UPDATE wagtailcore_page
|
||||
SET url_path= CONCAT(%s, substring(url_path, %s))
|
||||
WHERE path LIKE %s AND id <> %s
|
||||
"""
|
||||
else:
|
||||
update_statement = """
|
||||
UPDATE wagtailcore_page
|
||||
|
Loading…
Reference in New Issue
Block a user