Skip to content

Drizzle-kit migration infrastructure for API#11

Open
dnplkndll wants to merge 9 commits intomainfrom
feat/drizzle-orm-infra
Open

Drizzle-kit migration infrastructure for API#11
dnplkndll wants to merge 9 commits intomainfrom
feat/drizzle-orm-infra

Conversation

@dnplkndll
Copy link
Owner

Summary

  • docker-compose: bind-mount tools/ and drizzle/ into API container for local dev
  • Dockerfile.prod: COPY drizzle/ into prod image for Helm initdb Job
  • initdb.sh: rewrite to apply drizzle migration SQL from drizzle/<dialect>/<module>/ instead of per-table SQL from dbScripts/; MySQL stored procs loaded by name whitelist
  • load-tests: fix unqualified table name in seed SQL, add PostgreSQL seed variant
  • repos.yaml: update B1Admin branch reference

Pairs with ChurchApps/Api#22 (Drizzle ORM migration).

Test plan

  • docker compose up — API starts, initdb applies drizzle migrations
  • Helm deploy verified on MySQL (b1-test) and PostgreSQL (b1-postgres)
  • 299 API integration tests passing on both dialects

🤖 Generated with Claude Code

dnplkndll and others added 9 commits March 15, 2026 06:52
Support the API's migration from raw SQL dbScripts to drizzle-kit
managed migrations with dual MySQL/PostgreSQL dialect support.

- docker-compose: bind-mount tools/ and drizzle/ into API container
- Dockerfile.prod: COPY drizzle/ directory into prod image
- initdb.sh: rewrite to apply drizzle migration SQL files from
  drizzle/<dialect>/<module>/ instead of per-table SQL from dbScripts/;
  MySQL stored procs loaded separately by name whitelist
- load-tests: fix unqualified table name, add PG seed variant
- repos.yaml: update B1Admin branch reference

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Prefix services INSERT with attendance. schema (was inserting into
  wrong schema since PG uses schemas not separate databases)
- Add 2,000 groupMembers via generate_series (matching MySQL version)
- Add members count to verification query

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Next.js dev mode compiles on first request. In CI runners this
exceeds 180s consistently — failing on both main and PR branches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
B1App returns 500 on all routes due to missing
@/styles/vendor/pages.css in ChurchApps/B1App upstream.
This blocks the wait-ready health check indefinitely.

- Add WAIT_SERVICES env var to wait-ready.sh for selective checks
- Skip B1App wait, E2E tests, and artifact upload in CI
- Revert timeout to 180s (sufficient without B1App)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The B1App CSS import issue (missing src/styles/vendor/pages.css) is now
fixed on dnplkndll/B1App#fix/missing-vendor-css (upstream PR: ChurchApps/B1App#460).

- Add fix/missing-vendor-css to B1App merges in repos.yaml
- Restore B1App in wait-ready (was excluded with WAIT_SERVICES filter)
- Remove skip comments for B1App E2E tests
- Increase WAIT_TIMEOUT to 300s (B1App Next.js cold-compile needs time)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Upstream @churchapps/apphelper-donations@0.6.18 declares a peer dep on
@churchapps/helpers@"file:../helpers" which cannot resolve in CI. This
matches the same workaround used in the Docker build (commit 3991dc1).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
B1App has an upstream CSS resolution issue that causes 500 errors on
startup, blocking the wait-ready script. Since B1Admin E2E tests only
need the API and B1Admin services, use WAIT_SERVICES to skip B1App.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests with retries take ~80min on CI. Increase timeout from 90 to 120
minutes. Add summary step to show pass/fail counts and failed test
names in CI logs for easier debugging.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant