在HSTORE Sqlalchemy迁移中未定义名称“文本”

时间:2017-06-21 11:43:03

标签: python postgresql sqlalchemy

当我尝试将HSTORE添加到我的模型并尝试升级时,它会抛出.xccconfig

我使用- Warnings.xcconfig - keep warnings separate |- Base.xcconfig - settings common for debug and release; inherits Warnings.scconfig |- Debug.xcconfig - debug only settings; inherits Base.xcconfig |- Release.xcconfig - release only settings; inherits Base.xcconfig - Target1.xcconfig - target specific settings, like Info.plist or product name - Target2_Debug.xcconfig - target settings for debug - Target2_Release.xcconfig - target settings for release 创建了修订版。

提前致谢?

更新 @Daniel Roseman建议我添加NameError: name 'Text' is not defined。我的问题是为什么在修订期间没有自动生成

错误:

  

op.add_column('customers',sa.Column('user_id',   postgresql.HSTORE(text_type = Text()),nullable = True))NameError:name   “文字”未定义

型号:

PYTHONPATH=. alembic revision --autogenerate -m "Added user_id, admin_id and role to Customer"

生成的迁移修订:

sa.Text()

0 个答案:

没有答案