Replies: 1 comment
-
This is an error in your migration script, not your model. Fix the script and you should be fine, I think. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,All:
I have specified String length in ORM, but after initialization and migration, an error is reported when upgarde。
Example:
class User(db,Model):
tablename = 'user'
name = db.Column(db.String(64))
after init
in path: /migrations/versions/xxxxxxx.py
sa.Column('name', sa.String())
do flask db upgrade there is an error: sqlalchemy.exc.ComplieError: (in table 'user',column 'name'):String require a length on dialect mysql
how to fix this?Thanks
Beta Was this translation helpful? Give feedback.
All reactions