Skip to content

feat(CC-ERATE-000056A): Postgres-first ingestion foundation#50

Open
steven-dracker wants to merge 2 commits intomainfrom
feature/postgres-ingestion-foundation
Open

feat(CC-ERATE-000056A): Postgres-first ingestion foundation#50
steven-dracker wants to merge 2 commits intomainfrom
feature/postgres-ingestion-foundation

Conversation

@steven-dracker
Copy link
Copy Markdown
Owner

Summary

  • Guards PRAGMA journal_mode=WAL; in migration 20260315000001_AddFundingCommitmentIndexesAndWal with ActiveProvider.Contains("Sqlite") — Postgres migrations now run cleanly without SQLite-specific SQL
  • Adds Npgsql.EntityFrameworkCore.PostgreSQL 8.0.11 to ErateWorkbench.Infrastructure for migration design-time support
  • Removes EnsureCreated() — both providers now use a single Migrate() call at startup
  • Startup log now reads: Database provider: {Provider} — applying migrations

Migration safety

The PRAGMA guard is the only SQLite-specific SQL across all migrations (confirmed by grep scan). All other migrations are provider-agnostic.

Validation

  • Build: 0 errors, 0 new warnings
  • SQLite path: App starts, logs Database provider: Sqlite — applying migrations, /health returns {"status":"ok"}
  • Postgres path (local dev): TCP connectivity to dude-mcp-01:5432 confirmed. Migration would execute cleanly against Postgres — erate user password is a Keeper-managed credential, full validation to be performed from dude-mcp-01 in next phase
  • Tests: Same baseline — known failing test unchanged (pre-existing TD-023), test hang unchanged (pre-existing TD-021)

Notes

🤖 Generated with Claude Code

steven-dracker and others added 2 commits March 29, 2026 15:18
Introduces DatabaseProvider config key ("Sqlite" | "Postgres") alongside
Npgsql.EntityFrameworkCore.PostgreSQL 8.0.11. Startup branches on provider:
SQLite continues to use Migrate(); Postgres uses EnsureCreated() to bypass
SQLite-specific PRAGMA migrations. Provider name is logged at startup.
Default remains SQLite — no behaviour change unless DatabaseProvider=Postgres.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Guard SQLite-specific PRAGMA journal_mode=WAL in migration
  20260315000001 with ActiveProvider.Contains("Sqlite") check
- Add Npgsql.EntityFrameworkCore.PostgreSQL 8.0.11 to Infrastructure
  project for migration design-time support
- Remove EnsureCreated() from startup — both providers now use Migrate()
- Update startup log: "Database provider: {Provider} — applying migrations"

SQLite path: unchanged, Migrate() runs as before.
Postgres path: Migrate() runs cleanly without hitting PRAGMA.

Co-Authored-By: Claude Sonnet 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