d4c89b4170
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.0 KiB
2.0 KiB
phase, plan, type, status, wave, completed
| phase | plan | type | status | wave | completed |
|---|---|---|---|---|---|
| 12 | 02 | execute | complete | 2 | 2026-06-15 |
12-02 SUMMARY — Apply migration 0008 to production (BLOCKING checkpoint)
What was done
Migration 0008_offer_tier_schema.sql (created in Plan 01) was applied to the
production database via the idempotent push script, run from the local
environment through an operator-opened SSH tunnel (local 127.0.0.1:54321 →
production host Postgres localhost:54321).
Command used (credentials read from .env.local, host/port rewritten to the
tunnel endpoint via URL() — never printed):
DATABASE_URL=$(node --env-file=.env.local -e 'const u=new URL(process.env.DATABASE_URL); u.host="127.0.0.1:54321"; process.stdout.write(u.toString())') \
npx tsx scripts/push-12-offer-tier-schema.ts
Script output: all 14 statements reported ready — ✓ Migration 0008 (offer tier schema) applied successfully.
Verification (against live prod)
offer_macrosgained:description, category, ticket, is_archived, cliente_ideale, risultato, tempo, pain, metodo✓offer_microsgained:tier_letter,public_price✓- Constraint
offer_micros_tier_letter_checkpresent ✓ - Table
offer_tier_servicesexists with columnstier_id, service_id, created_at✓ - Row counts unchanged (additive, no data loss):
offer_macros=1, offer_micros=1, clients=4, projects=5, payments=13, phases=6✓
Issues Encountered
- First attempts failed: direct
178.104.27.55:54321→CONNECT_TIMEOUT(firewalled, as in Phase 11); then through the tunnelECONNRESETon all SSL variants. Root cause: the SSH-Lforward initially targeted the wrong remote port; once re-opened pointing at the prod host's published Postgres port (localhost:54321),SELECT 1succeeded and the migration applied cleanly.
Self-Check: PASSED
Migration 0008 is live on production; all new columns/constraint/table queryable; no destructive changes; Waves 3–4 schema-dependent code is now unblocked.