- # imports - third-party imports
- import pymysql
- from pymysql.constants import ER
-
- class InvalidColumnName(frappe.ValidationError): pass
-
- varchar_len = '140'
- standard_varchar_columns = ('name', 'owner', 'modified_by', 'parent', 'parentfield', 'parenttype')
-
- type_map = {
- 'Currency': ('decimal', '18,6'),
- 'Int': ('int', '11'),
- 'Long Int': ('bigint', '20'), # convert int to bigint if length is more than 11
- 'Float': ('decimal', '18,6'),
- 'Percent': ('decimal', '18,6'),
- 'Check': ('int', '1'),
- 'Small Text': ('text', ''),
- 'Long Text': ('longtext', ''),
- 'Code': ('longtext', ''),
- 'Text Editor': ('longtext', ''),
- 'Date': ('date', ''),