🐛 修复使用 PostgreSQL 时迁移脚本的报错 (#200)

This commit is contained in:
uy/sun 2023-02-20 12:34:06 +08:00 committed by GitHub
parent 609340ed92
commit e93602dbf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,12 +23,14 @@ def upgrade():
existing_type=sa.VARCHAR(length=1024),
type_=sa.JSON(),
existing_nullable=True,
postgresql_using="categories::json",
)
batch_op.alter_column(
"tags",
existing_type=sa.VARCHAR(length=1024),
type_=sa.JSON(),
existing_nullable=True,
postgresql_using="tags::json",
)
# ### end Alembic commands ###