Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip schema from index names in internal schema representation #278

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

andrew-farries
Copy link
Collaborator

Remove the schema component from index names in the internal schema representation.

A pgroll migration is always run in the context of a a specific schema so the extra qualification is redundant.

Removing the schema component from the index names makes it easy to identify duplicated indexes by name when temporary columns and associated attributes are renamed on migration completion.

Tests for this change are already in place (#276, #277). As of this PR, migration tests run in a non-public schema will pass:

PGROLL_TEST_SCHEMA=foo go test ./...

Part of #273

@andrew-farries andrew-farries merged commit e906da7 into main Feb 7, 2024
26 checks passed
@andrew-farries andrew-farries deleted the fix-unique-drop-in-non-public-schema branch February 7, 2024 12:08
andrew-farries added a commit that referenced this pull request Feb 7, 2024
Add another dimension to the test matrix so that migration tests are run
in both the `public` and a non-`public` schema.

#276 made it possible to run
migration tests in schema other than `public`. Doing so highlighted some
issues that are fixed by #278.

Fixes #273.
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.

None yet

2 participants