How to use Flask-Migrate to do database migration?
问题 I come across a problem when playing with Flask-Migrate to upgrade/downgrade the database. There were two tables, User and Post , defined by the following classes: class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(64), index=True, unique=True) email = db.Column(db.String(120), index=True, unique=True) password_hash = db.Column(db.String(128)) posts = db.relationship('Post', backref='author', lazy='dynamic') def __repr__(self): return '<User {}>'