#!/bin/bash set -e echo "Applying Migration 018: Legal Templates..." /usr/local/bin/docker exec bp-compliance-backend python3 -c " import psycopg2, os conn = psycopg2.connect(os.getenv('DATABASE_URL')) cur = conn.cursor() with open('/app/migrations/018_legal_templates.sql') as f: cur.execute(f.read()) conn.commit() cur.close() conn.close() print('Migration 018 applied successfully') " echo "Done."