Improve view support for pscale database dump / restore-dump #932
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.
This should address the problem described in the following two issues:
#921
#701
And adds support for exporting views with the
-schema-view.sql
suffix, avoids running the view queries and exporting data from them unnecessarily, and allows for restoring / overwriting the views when the--overwrite-tables
flag is passed in.The goal was to implement the desired functionality with minimal changes to the existing files but the new
information_schema
query that was added indumper.go
did lead to some required additions in thedumper_test.go
file.As I also have PR#910 open at the moment that includes other modifications to
dumper.go
andloader.go
this one may be simpler to review / approve first and then I can update the other pull request afterward.