Flask-migrate: change model attributes and rename corresponding database columns
问题 I have a bit of experience with Flask but not very much with databases (Flask-migrate / alembic / SqlAlchemy). I'm following this tutorial and things are working quite alright. I have a User model like this: # user_model.py from app import DB ... other imports class User(UserMixin, DB.Model): __tablename__ = 'users' 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