-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
Export schemas #4260
Draft
Anish9901
wants to merge
19
commits into
develop
Choose a base branch
from
schema_exports
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Export schemas #4260
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
ec8782f
get prototype working!
Anish9901 527795d
Merge branch 'develop' into schema_exports
Anish9901 700f011
add schema export button
Anish9901 1c45391
fix lint errors for SchemaPage.svelte
Anish9901 1f6568e
add url for schema exports
Anish9901 719b6da
add functions for dumping schema to a .sql file
Anish9901 2935104
remove prototype files
Anish9901 e77631e
revert export.py
Anish9901 abfaf0a
some readability improvements
Anish9901 8ae2b3c
Merge branch 'develop' into schema_exports
Anish9901 0ce48c3
add sql function to determine custom type dependency
Anish9901 fb5b794
wire dependency func from python to sql
Anish9901 6232e47
use the right command for pg_dump based on custom type dependency
Anish9901 8fe9548
update all_mathesar_objects table
Anish9901 5ec5699
add tests for schema_has_custom_type_dependency
Anish9901 86c728e
Merge branch 'develop' into schema_exports
pavish 3110c2f
Merge branch 'develop' into schema_exports
pavish efbae44
Move export schema button to dropdown
pavish 1d01f70
Show export schema sql option only when current role is superuser
pavish File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should add the
--inserts
flag here. We should prioritize compatibility over performance, unless the performance really becomes a problem for someone.I'd also like you to look into whether there's a flag to add that will get rid of the
SET
commands at the start of the file. Those can also cause problems when loading, and aren't usually needed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no such flag, unfortunately, users would have to take those statements out manually. Apparently, postgres includes those statements to make sure that upon restore, the server behaves exactly the same as when the dump was created.
Given this, and the fact that we use
GENERATED BY DEFAULT AS IDENTITY
forid
columns, would it make sense for us to prioritize compatibility over performance? The performance for someone dumping their local database and restoring it on a remote server would be terrible if there's a lot of data. Assuming this being a fairly common use case for someone using our product.