From 2b10264166e8d56aba5846a4fc1a6d480bfef600 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 7 May 2015 17:23:34 +0530 Subject: [PATCH] [fix] don't unique text fields --- frappe/model/db_schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/model/db_schema.py b/frappe/model/db_schema.py index b7fdfe6e0c..5321314a7c 100644 --- a/frappe/model/db_schema.py +++ b/frappe/model/db_schema.py @@ -256,10 +256,10 @@ class DbColumn: return column_def if self.default and (self.default not in default_shortcuts) \ - and not self.default.startswith(":") and column_def not in ['text', 'longtext']: + and not self.default.startswith(":") and column_def not in ('text', 'longtext'): column_def += ' default "' + self.default.replace('"', '\"') + '"' - if self.unique: + if self.unique and column_def not in ('text', 'longtext'): column_def += ' unique' return column_def