python - flask sqlalchemy migrate how to ignore existing tables or fields
黄舟
黄舟 2017-05-18 10:44:36
0
1
1014

As the title states, when I upgrade, I get an error sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1060, "Duplicate column name 'period'") [SQL: u'ALTER TABLE text_template ADD COLUMN period INTEGER']

It seems to mean that the field already exists in this table. How to set it to ignore the existing table or field? Thanks

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
我想大声告诉你

You can manually modify the migrate file and remove existing fields.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template