fix: bind template version migration json
This commit is contained in:
@@ -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"],
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user