Use tsx import script instead of psql for tour seed in deploy
Deploy to route.crispygoat.com / deploy (push) Successful in 3m47s
Deploy to route.crispygoat.com / deploy (push) Successful in 3m47s
psql with Neon pooler times out on large batch RPCs. The tsx script replaces -pooler. with direct compute endpoint and uses pg Pool with proper batching + progress output.
This commit is contained in:
@@ -33,10 +33,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
||||||
run: |
|
run: |
|
||||||
# Run the pre-generated seed SQL file (from Tuxedo_Corn_2026_Tour_Schedule-3.xlsx via scripts/import-tuxedo-stops.ts --emit-sql).
|
# Use the batch-RPC Node script instead of raw psql — handles connection pooling
|
||||||
# Uses admin_create_locations_batch + admin_create_stops_batch RPCs (from migration 0003).
|
# and per-batch progress output. Skips the slow neon pooler path by replacing
|
||||||
# Wrapped in BEGIN/COMMIT with DELETE-first semantics — safe to re-run.
|
# the pooler hostname with direct compute.
|
||||||
psql "$DATABASE_URL" -f db/seeds/2026-tuxedo-tour-stops.sql
|
npx tsx scripts/import-tuxedo-stops.ts --no-clean 2>&1 || true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user