From 9e2e65f3054c52652b3491713f28d80b80efdfd3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 25 Jun 2018 16:00:01 +0530 Subject: [PATCH] [fix] varchar_len in global_search.py --- frappe/utils/global_search.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frappe/utils/global_search.py b/frappe/utils/global_search.py index a3d728cc2f..0f640083f7 100644 --- a/frappe/utils/global_search.py +++ b/frappe/utils/global_search.py @@ -11,7 +11,6 @@ from frappe.model.base_document import get_controller from frappe.model.db_schema import varchar_len from six import text_type - def setup_global_search_table(): """ Creates __global_seach table @@ -20,17 +19,16 @@ def setup_global_search_table(): if not '__global_search' in frappe.db.get_tables(): frappe.db.sql('''create table __global_search( doctype varchar(100), - name varchar(140), - title varchar(140), + name varchar({varchar_len}), + title varchar({varchar_len}), content text, fulltext(content), - route varchar(140), + route varchar({varchar_len}), published int(1) not null default 0, unique `doctype_name` (doctype, name)) COLLATE=utf8mb4_unicode_ci ENGINE=MyISAM - CHARACTER SET=utf8mb4''') - + CHARACTER SET=utf8mb4'''.format(varchar_len=varchar_len)) def reset(): """