Flask SQLAlchemy 设定MySQL表引擎

python wqw 172℃ 扫描二维码
class User(db.Model):
    __table_args__ = {'mysql_engine':'InnoDB'}
user_role = Table(
    'user_role',
    db.Model.metadata,
    Column('role_id', Integer, ForeignKey("role.id"), primary_key=True),
    Column('user_id',Integer,ForeignKey('user.id'),primary_key=True),
    mysql_engine='InnoDB'
)
点赞 (0)分享 (0)