feat: add return to service workflow

This commit is contained in:
lussierj committed 2026-07-29 19:02:23 +00:00
1 parent 72ad19a071
commit f2b736b08e
19 files changed
+2883 -46

No files matched your search

+4 -4
View File
@@ -57,7 +57,7 @@ echo "Upgrading the previous head to Begin Repair..."
run_alembic upgrade 0009_inventory_asset_id_history
previous_revision="$(run_alembic current 2>/dev/null)"
[[ "${previous_revision}" == *"0009_inventory_asset_id_history"* ]]
run_alembic upgrade head
run_alembic upgrade 0010_begin_repair
current_revision="$(run_alembic current 2>/dev/null)"
[[ "${current_revision}" == *"0010_begin_repair"* ]]
@@ -534,17 +534,17 @@ SELECT
SQL
)"
[[ "${downgrade_state}" == "t" ]]
run_alembic upgrade head
run_alembic upgrade 0010_begin_repair
reupgraded_revision="$(run_alembic current 2>/dev/null)"
[[ "${reupgraded_revision}" == *"0010_begin_repair"* ]]
echo "Migrating an empty database from base through head..."
echo "Migrating an empty database from base through Begin Repair..."
"${compose[@]}" exec -T postgres sh -ec \
'psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -d postgres \
-c "CREATE DATABASE minerops_repair_empty"' >/dev/null
"${compose[@]}" run --rm --no-deps \
-e "POSTGRES_DB=${empty_database}" \
backend alembic upgrade head
backend alembic upgrade 0010_begin_repair
empty_revision="$(
"${compose[@]}" run --rm --no-deps \