-
1 votesanswersviews
如何创建迁移脚本以在SQLAlchemy-Migrate中添加几何列?
我跟着Flask mega tutorial . 在我尝试将Geometry列添加到数据库之前,这一切都运行良好 . 请注意,它位于Post类中,称为位置 . #! model.py from app import db from geoalchemy2 import Geometry class User(db.Model): id = db.Column(db.Integer, pr... -
16 votesanswersviews
sqlalchemy postgresql枚举不会在db migrate上创建类型
我在Python3下使用Flask开发了一个web应用程序 . 我在db migrate / upgrade上遇到postgresql枚举类型的问题 . 我在模型中添加了一个“状态”列: class Banner(db.Model): ... status = db.Column(db.Enum('active', 'inactive', 'archive', name='bann...