mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-05 15:41:08 +00:00
Add @kryton's fix for MySQL support in _update_descendant_url_paths, from #215
This commit is contained in:
parent
419b671fcc
commit
ba339a0bfb
1 changed files with 6 additions and 0 deletions
|
|
@ -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 a new issue