SQLAlchemy为postgres JSON列设置默认值

2024-05-09 22:07:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我想将SQLAlchemy postgres JSON列的默认值设置为空字典。在

from sqlalchemy.dialects.postgresql import JSON

info = Column(JSON, default='{}')
info = Column(JSON, default={})

这些都不管用。在


Tags: fromimportinfojsondefault字典sqlalchemypostgresql