[英]how to update a table from a JSON loaded object using peewee ORM on python
[英]In python how to update psql Table column from updated peewee schema
我在psql
数据库中具有以下属性:
author_ids = ArrayField(null=False)
我想使用以下属性更新该表的列:
author_ids = ArrayField(IntegerField, null=False, index=True)
我正在使用Peewee的迁移,但是没有更新列的内容。
没错, 架构迁移中没有用于修改列类型的API。 但是从ArrayField
,我想说的是默认值已经是IntegerField
,所以这里没有变化。
剩下的唯一更改就是index = True
,这由add_index
覆盖。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.