Skip to content
Snippets Groups Projects
Commit e8f7e4ac authored by joe's avatar joe
Browse files

adding default VARCHAR size for sqlalchemy interface.

parent 66c50d1a
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,8 @@ class %(class_name)s(Base):
type_args = []
if 'size' in field.attrs:
type_args.append(str(field.attrs['size']))
elif field.type == 'string': #needed for mysql that needs a size for varchars
type_args.append('256')
return '%s(%s)' % (type_map[field.type],
', '.join(type_args))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment