Fix: deploy.py DB verification accepts alembic version >= 0045
This commit is contained in:
+4
-2
@@ -260,10 +260,12 @@ def verify_db() -> DeployResult:
|
||||
print(" Verifying database...")
|
||||
checks = []
|
||||
|
||||
# Check alembic version
|
||||
# Check alembic version — must be at least 0045 (latest migration)
|
||||
code, output = ssh_run('docker exec crm-postgres psql -U crm_user -d crm_db -t -c "SELECT version_num FROM alembic_version" 2>/dev/null')
|
||||
version = output.strip()
|
||||
checks.append(("Alembic version", version, version == "0040_outbox"))
|
||||
# Accept any version >= 0045 (covers 0045, 0044_repair_contact_migration, etc.)
|
||||
version_ok = version >= "0045" or version.startswith("0045")
|
||||
checks.append(("Alembic version", version, version_ok))
|
||||
|
||||
# Check RLS
|
||||
code, output = ssh_run('docker exec crm-postgres psql -U crm_user -d crm_db -t -c "SELECT count(*) FROM pg_class WHERE relrowsecurity=true AND relforcerowsecurity=true" 2>/dev/null')
|
||||
|
||||
Reference in New Issue
Block a user