fix(alembic): bridge ghost migration 2026_05_28_add_tool_definition_manifests
The production database was stamped with a migration that no longer exists in the codebase (created on another branch, applied, then removed). This adds a no-op bridge migration so Alembic can reconcile the DB state. - Create bridge migration 2026_05_28_add_tool_definition_manifests (no-op) - Re-chain terminal_sessions migration to depend on the bridge - Fixes startup failure: Can't locate revision identified by ...
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# Fix ghost migration on production server
|
||||
# Run this INSIDE the api container or on the server
|
||||
|
||||
echo "=== Checking for ghost migration file ==="
|
||||
find /app/alembic/versions -name "*tool_definition*" 2>/dev/null
|
||||
|
||||
echo ""
|
||||
echo "=== Current alembic_version in DB ==="
|
||||
psql "$DATABASE_URL" -c "SELECT * FROM alembic_version;"
|
||||
|
||||
echo ""
|
||||
echo "=== Checking if tool_types has definition_manifests column ==="
|
||||
psql "$DATABASE_URL" -c "\d tool_types" | grep -i manifest
|
||||
|
||||
echo ""
|
||||
echo "=== Our known migration heads ==="
|
||||
grep -r "revision.*=" /app/alembic/versions/*.py | grep "2026_05_28"
|
||||
Reference in New Issue
Block a user