Skip to content

Preserve explicit extension schemas in model snapshots - #4174

Open
gabisonia wants to merge 1 commit into
npgsql:mainfrom
gabisonia:fix/4141-extension-snapshot-schema
Open

gabisonia wants to merge 1 commit into
npgsql:mainfrom
gabisonia:fix/4141-extension-snapshot-schema

Conversation

@gabisonia

Copy link
Copy Markdown

When a model configures HasPostgresExtension("public", "citext"), the snapshot generator drops the explicit schema. EF then reports pending model changes immediately after scaffolding a migration. Generate the schema argument whenever the model specifies one, including public.

The regression test covers both public and a custom schema. I also scaffolded and applied a migration on PostgreSQL 17.6 with tenant first on the search path. EF reported no pending changes, and PostgreSQL installed citext in public.

Release unit tests passed (770 passed, 6 skipped). Formatting and git diff --check passed.

Fixes #4141.

This branch has not been deployed

No deployments
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.

Model snapshot drops the "public" schema from HasPostgresExtension

1 participant