fix: bind template version migration json

This commit is contained in:
2026-05-16 13:02:58 +08:00
parent b295d18fec
commit bab3886701
2 changed files with 6 additions and 5 deletions
@@ -110,9 +110,8 @@ def _backfill_template_version_metadata() -> None:
continue
hash_suffix = hashlib.sha1(str(row["id"]).encode("utf-8")).hexdigest()[:12]
bind.execute(
sa.text(
"""
insert_stmt = sa.text(
"""
INSERT INTO contract_template_versions (
id,
template_id,
@@ -145,7 +144,9 @@ def _backfill_template_version_metadata() -> None:
:created_at
)
"""
),
).bindparams(sa.bindparam("variables_json", type_=sa.JSON()))
bind.execute(
insert_stmt,
{
"id": f"tplver-{hash_suffix}",
"template_id": row["id"],
+1 -1
View File
@@ -272,7 +272,7 @@ mkdir -p backend
tar -xzf "`$archive" --strip-components=1 -C backend
test -f backend/Dockerfile
test -f backend/app/main.py
docker compose -f "`$compose" build --no-cache backend
docker compose -f "`$compose" build backend
docker compose -f "`$compose" up -d backend
docker compose -f "`$compose" ps backend frontend postgres redis
if [ "`$keep_archive" != "true" ]; then rm -f "`$archive"; fi