Merge branch 'develop'

This commit is contained in:
Anand Doshi 2015-10-19 17:25:55 +05:30
commit 975253d25a
7 changed files with 11 additions and 7 deletions

View file

@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = "6.5.0"
__version__ = "6.5.1"

View file

@ -26,7 +26,7 @@ to ERPNext.
"""
app_icon = "octicon octicon-circuit-board"
app_version = "6.5.0"
app_version = "6.5.1"
app_color = "orange"
github_link = "https://github.com/frappe/frappe"

View file

@ -106,7 +106,7 @@ class DbTable:
try:
# check for truncation
max_length = frappe.db.sql("""select max(length(`{fieldname}`)) from `tab{doctype}`"""\
max_length = frappe.db.sql("""select max(char_length(`{fieldname}`)) from `tab{doctype}`"""\
.format(fieldname=col.fieldname, doctype=self.doctype))
except MySQLdb.OperationalError, e:

View file

@ -11,6 +11,7 @@ execute:frappe.reload_doc('core', 'doctype', 'version') #2014-02-21
execute:frappe.reload_doc('email', 'doctype', 'email_alert') #2014-07-15
execute:frappe.reload_doc('desk', 'doctype', 'todo') #2014-12-31-1
execute:frappe.reload_doc('custom', 'doctype', 'property_setter') #2014-12-31-1
execute:frappe.reload_doctype("File") # 2015-10-19
execute:frappe.db.sql("alter table `tabSessions` modify `user` varchar(255), engine=InnoDB")
execute:frappe.db.sql("delete from `tabDocField` where parent='0'")
frappe.patches.v4_0.change_varchar_length
@ -96,4 +97,4 @@ execute:frappe.db.sql("delete from tabSessions where user is null")
frappe.patches.v6_2.rename_backup_manager
execute:frappe.delete_doc("DocType", "Backup Manager")
frappe.patches.v6_4.reduce_varchar_length
frappe.patches.v6_4.rename_bengali_language
frappe.patches.v6_4.rename_bengali_language

View file

@ -12,12 +12,12 @@ def execute():
if not column_type.startswith("varchar"):
continue
max_length = frappe.db.sql("""select max(length(`{fieldname}`)) from `tab{doctype}`"""\
max_length = frappe.db.sql("""select max(char_length(`{fieldname}`)) from `tab{doctype}`"""\
.format(fieldname=fieldname, doctype=doctype))
max_length = max_length[0][0] if max_length else None
if max_length and max_length > 140:
if max_length and 140 < max_length <= 255:
print "setting length of '{fieldname}' in '{doctype}' as {length}".format(
fieldname=fieldname, doctype=doctype, length=max_length)

View file

@ -65,6 +65,9 @@ def is_signup_enabled():
def cleanup_page_name(title):
"""make page name from title"""
if not title:
return title
name = title.lower()
name = re.sub('[~!@#$%^&*+()<>,."\'\?]', '', name)
name = re.sub('[:/]', '-', name)

View file

@ -1,6 +1,6 @@
from setuptools import setup, find_packages
version = "6.5.0"
version = "6.5.1"
with open("requirements.txt", "r") as f:
install_requires = f.readlines()