fix: Update value if conflicting
This commit is contained in:
parent
e8961aee80
commit
f7e594a618
1 changed files with 8 additions and 2 deletions
|
|
@ -219,9 +219,15 @@ def insert_values_for_multiple_docs(all_contents):
|
|||
# ignoring duplicate keys for doctype_name
|
||||
frappe.db.multisql(
|
||||
{
|
||||
"mariadb": """INSERT IGNORE INTO `__global_search`
|
||||
"mariadb": """INSERT INTO `__global_search`
|
||||
(doctype, name, content, published, title, route)
|
||||
VALUES {} """.format(", ".join(batch_values)),
|
||||
VALUES {}
|
||||
ON DUPLICATE KEY UPDATE
|
||||
content=VALUE(content),
|
||||
published=VALUE(published),
|
||||
title=VALUE(title),
|
||||
route=VALUE(route)
|
||||
""".format(", ".join(batch_values)),
|
||||
"postgres": """INSERT INTO `__global_search`
|
||||
(doctype, name, content, published, title, route)
|
||||
VALUES {}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue