{{ message }}
Repository navigation
refactor: add schema snapshot - #66
Open
AndrewJackson2020 wants to merge 3 commits into
Open
AndrewJackson2020 wants to merge 3 commits into
AndrewJackson2020 wants to merge 3 commits into
Conversation
Comment on lines
+1
to
+18
Member
There was a problem hiding this comment.
For better readability I think we should remove the unnecessary SETtings and comments.
Contributor
Author
There was a problem hiding this comment.
Unfortunately pg_dump doesn't have options for this. Changed the script to output to stdout and then do some piped greg -v filtering. Its not the prettiest but it works.
AndrewJackson2020
force-pushed
the
vault_schema_snapshot
branch
from
October 20, 2026 20:40
4ad1597 to
ddec27e
Compare
Contributor
|
@AndrewJackson2020 can we add similar checks in other extensions as well if not present. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

We have moved on from maintaining multiple code path for new installs and migrations in SQL scripts which is nice and less error prone. But what we lose is the ability to diff the extension at a given point in time.
This PR adds a script and CI job that essentially snapshots the state of the extension and records it as text. This is useful because as we saw in pg_net in the past sometimes the incremental migration leads to a different outcome then was expected. For example one of the drifts that occurred in pg_net was dropping a primary key does not drop a null constraint automatically. With a snapshot we maintain the full state in addition to the incremental migration steps.