Add support for pg_dump -n and -N flags#1148
Open
digital2real wants to merge 1 commit intoplatformsh:mainfrom
Open
Add support for pg_dump -n and -N flags#1148digital2real wants to merge 1 commit intoplatformsh:mainfrom
digital2real wants to merge 1 commit intoplatformsh:mainfrom
Conversation
546e545 to
cec4176
Compare
--pg-namespace=PG-NAMESPACE translate to -n, --schema=SCHEMA dump the named schema(s) only --pg-exclude-namespace=PG-EXCLUDE-NAMESPACE translate to -N, --exclude-schema=SCHEMA do NOT dump the named schema(s)
cec4176 to
1768bf4
Compare
pjcdawkins
reviewed
Nov 16, 2022
| $this->setName('db:dump') | ||
| ->setDescription('Create a local dump of the remote database'); | ||
| $this->addOption('schema', null, InputOption::VALUE_REQUIRED, 'The schema to dump. Omit to use the default schema (usually "main").') | ||
| ->addOption('pg-namespace', null, InputOption::VALUE_REQUIRED| InputOption::VALUE_IS_ARRAY, 'Dump the named namespace/schema(s) only (Postgresql specific)') |
Collaborator
There was a problem hiding this comment.
Is this different than --schema above?
Author
There was a problem hiding this comment.
Yes : with postgresql schema != database (not like mysql or mariadb)
"A database contains one or more named schemas, which in turn contain tables. Schemas also contain other kinds of named objects, including data types, functions, and operators. The same object name can be used in different schemas without conflict; for example, both schema1 and myschema can contain tables named mytable. Unlike databases, schemas are not rigidly separated: a user can access objects in any of the schemas in the database they are connected to, if they have privileges to do so."
https://www.postgresql.org/docs/current/ddl-schemas.html
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.
--pg-namespace=PG-NAMESPACE
translate to -n, --schema=SCHEMA
dump the named schema(s) only
--pg-exclude-namespace=PG-EXCLUDE-NAMESPACE
translate to -N, --exclude-schema=SCHEMA
do NOT dump the named schema(s)