Skip to content

Always remove version schema on rollback and complete #920

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

Merged
merged 3 commits into from
Jun 19, 2025

Conversation

andrew-farries
Copy link
Collaborator

Always clean up version schema on migation completion and rollback, regardless of the value of the disableVersionSchemas flag.

It doesn't make sense to keep old version schema around after migration completion/rollback as the views in the schema won't work after the underlying tables are contracted.

The option makes sense only in the context of creating version schema on migration start.

Part of #872

It doesn't make sense to keep the version schema around after migration
completion as the views in the schema won't work after the underlying
tables are contracted.
It doesn't make sense to keep the version schema around after migration
rollback as the views in the schema won't work after the underlying
tables are contracted back to their original state.
@github-actions github-actions bot temporarily deployed to Docs Preview June 19, 2025 11:51 Inactive
Copy link

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/xataio/pgroll/pkg/roll 79.74% (-0.19%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/xataio/pgroll/pkg/roll/execute.go 79.27% (-0.37%) 164 (-3) 130 (-3) 34 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@andrew-farries andrew-farries marked this pull request as ready for review June 19, 2025 11:55
@andrew-farries andrew-farries requested a review from kvch June 19, 2025 11:55
@andrew-farries andrew-farries merged commit 899645a into main Jun 19, 2025
30 checks passed
@andrew-farries andrew-farries deleted the always-remove-version-schema-on-rollback branch June 19, 2025 14:01
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.

2 participants