def canonize_types(self): for table in self.tables: for field in table.fields: meta_type = get_meta_type_postgresql(field.type.upper()) field.type = MySQLPreferedDataTypes[meta_type]
def get_type_string(self, field): result = field.type if field.length != 0 or get_meta_type_postgresql(field.type) not in LENGTH_INDIFFERENT_TYPES: result += '(' + str(field.length) + ')' return result