Skip to content
This repository was archived by the owner on Oct 18, 2026. It is now read-only.

ci: add schema-migration guard and GitHub Actions quality gates - #6

Merged
HyperAfnan merged 1 commit into
masterfrom
dev
Oct 11, 2026
Merged

HyperAfnan merged 1 commit into
masterfrom
dev

Conversation

@HyperAfnan

Copy link
Copy Markdown
Collaborator
  • scripts/check-schema-migration.sh: fail when prisma/schema.prisma changes without a matching migration under prisma/migrations/ (defaults to origin/master; message points at HANDOFF.md for the DB apply step)
  • .github/workflows/ci.yml: on push/PR to master + dev (Node 22, fetch-depth 0) run the guard, then npm test, then npm run build
  • skip DB-backed suites in CI via CI_SKIP_DB (ingest-utc "Database ..." block, challenge-sync); workflow supplies placeholder DATABASE_URL/DIRECT_URL so PrismaClient still imports
  • add prisma/migrations/20261011000000_add_is_leave_to_study_logs_v2 ( ADD COLUMN IF NOT EXISTS, no-op on prod where the column already exists)
  • AGENTS.md: record that schema changes must ship with a migration
  • HANDOFF.md: CI notes; mark the monotonic/zero-overwrite guard as rejected (it would block legitimate downward corrections)

- scripts/check-schema-migration.sh: fail when prisma/schema.prisma changes
  without a matching migration under prisma/migrations/ (defaults to
  origin/master; message points at HANDOFF.md for the DB apply step)
- .github/workflows/ci.yml: on push/PR to master + dev (Node 22,
  fetch-depth 0) run the guard, then npm test, then npm run build
- skip DB-backed suites in CI via CI_SKIP_DB (ingest-utc "Database ..." block,
  challenge-sync); workflow supplies placeholder DATABASE_URL/DIRECT_URL so
  PrismaClient still imports
- add prisma/migrations/20261011000000_add_is_leave_to_study_logs_v2 (
  ADD COLUMN IF NOT EXISTS, no-op on prod where the column already exists)
- AGENTS.md: record that schema changes must ship with a migration
- HANDOFF.md: CI notes; mark the monotonic/zero-overwrite guard as rejected
  (it would block legitimate downward corrections)
@HyperAfnan
HyperAfnan merged commit 79de66c into master Oct 11, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant