PostgreSQL: replace EF migrations with SQL-first initialization, fix connection handling, and update setup docs #1
Reference in New Issue
Block a user
Delete Branch "upgrade-to-NET11"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The MCP server PostgreSQL MCP may have new tools and requires interaction to start. Start it now?
I’ll inspect the most recent 24 commits in this repo and synthesize them into a concise PR summary with key changes, risk areas, and testing notes. I’m starting by gathering the commit log and changed files.
PR Summary (Last 24 Commits)
This PR is a major PostgreSQL migration hardening pass focused on replacing EF Core migration/runtime schema creation with SQL-first initialization, plus connection/configuration fixes and documentation updates.
What Changed
Reworked database initialization flow to rely on manual SQL scripts instead of EF Core migrations.
Disabled migration-driven paths (EnsureCreatedAsync/migration service behavior) and shifted to explicit script execution.
Added/updated SQL scripts for schema setup and supplementary indexes, including ActivityLogs index handling for CONCURRENTLY.
Updated initialization checks to detect real DB readiness by checking table presence.
Switched schema execution path to use a psql subprocess.
Fixed provider configuration so ConnectionString from config is respected reliably.
Fixed password masking behavior and minor StyleCop/readability issues.
Reorganized SQL/schema assets and related script paths.
Expanded and refreshed operational docs/README for Linux dependencies, PostgreSQL setup, and DB bootstrap workflow.
Updated Linux publish profile/config-related project settings.
Why
Improve reliability of PostgreSQL startup/bootstrapping under .NET 11 preview constraints.
Avoid unstable/unsupported migration behaviors in this environment.
Make DB setup deterministic and operator-controlled via SQL artifacts.
Risk / Impact
High behavior-change risk in startup/first-run DB initialization due to migration disablement.
New runtime dependency on psql availability and environment pathing.
Schema scripts no longer create the database automatically in some paths (DB may need to pre-exist).
SQL file/path reorganization may affect existing automation/scripts.
Validation Focus
Fresh install against empty PostgreSQL DB.
Upgrade path from an existing populated DB.
Startup behavior when psql is missing/misconfigured.
Connection string precedence from config (database.xml/app settings).
Index script execution correctness (especially ActivityLogs concurrent index creation).