Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get rid of extended usage, make usage pretty
- Loading branch information
1 parent
95ac6cc
commit e9b73a7
Showing
3 changed files
with
106 additions
and
87 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<?php /* | ||
Header generated by `figlet -f chunky dbsteward` | ||
Color scheme located in dbsteward::arg_parse() | ||
*/ ?> | ||
__ __ __ __ | ||
.--| | |--.-----.| |_.-----.--.--.--.---.-.----.--| | | ||
| _ | _ |__ --|| _| -__| | | | _ | _| _ | | ||
|_____|_____|_____||____|_____|________|___._|__| |_____| | ||
|
||
<keyword>DBSteward</keyword> version <value><?php echo $VERSION ?></value> | ||
|
||
<header>Global Switches and Flags</header> | ||
<keyword>--sqlformat=</keyword><value><pgsql8|mssql10|mysql5></value> change the SQL dialect to operate in. If not specified or cannot be derived | ||
from input, pgsql8 will be used by default. | ||
<keyword>-v[v[v]]</keyword> see more detail (verbose). -vvv is not advised for normal use. | ||
<keyword>-q[q]</keyword> see less detail (quiet). | ||
<keyword>--debug</keyword> display extended information about errors. Automatically implies -vv. | ||
<keyword>-h, --help</keyword> show this usage information | ||
|
||
<keyword>--quoteschemanames</keyword> quote schema names in SQL output | ||
<keyword>--quotetablenames</keyword> quote table names in SQL output | ||
<keyword>--quotecolumnnames</keyword> quote column names in SQL output | ||
<keyword>--quoteallnames</keyword> quote ALL identifiers in SQL output | ||
<keyword>--quoteillegalnames</keyword> quote illegal identifiers and treat as a warning, rather than an error. | ||
<keyword>--quotereservednames</keyword> quote reserved identifiers and treat as a warning, rather than an error. | ||
|
||
<header>Generating SQL DDL / DML / DCL</header> | ||
<keyword>--xml=</keyword><value><database.xml></value><keyword> ...</keyword> adds an XML file to be processed. Can be specified more than once, and | ||
subsequent files will be overlayed on top of previous files. | ||
<keyword>--pgdataxml=</keyword><value><pgdata.xml></value><keyword> ...</keyword> pgsql8: overlay database_to_xml() formatted data. Multiples are overlayed. | ||
|
||
<header>Generating SQL DDL / DML / DCL difference statements to upgrade an 'old' database to the 'new' XML definition</header> | ||
<keyword>--oldxml=</keyword><value><database.xml></value><keyword> ...</keyword> adds an XML file to use for the old definition. Multiples are overlayed. | ||
<keyword>--newxml=</keyword><value><newdatabase.xml></value><keyword> ...</keyword> adds an XML file to use for the new definition. Multiples are overlayed. | ||
<keyword>--onlyschemasql</keyword> only upgrade schemas (DDL) | ||
<keyword>--onlydatasql</keyword> only upgrade static data (DML) | ||
<keyword>--onlytable=</keyword><value><schema.table></value><keyword> ...</keyword> only upgrade a single table | ||
<keyword>--singlestageupgrade</keyword> combine upgrade stages into one file, instead of the normal 4 stages | ||
<keyword>--maxstatementsperfile</keyword> how many DDL / DML / DCL statements per upgrade file segment | ||
<keyword>--ignoreoldnames</keyword> ignore oldSchemaName oldTableName oldColumnName attributes when differencing | ||
<keyword>--ignorecustomroles</keyword> ignore grants for custom roles | ||
<keyword>--ignoreprimarykeyerrors</keyword> ignore primary key errors when diffing two definitions | ||
|
||
<header>Database definition extraction utilities</header> | ||
<keyword>--dbschemadump</keyword> operate in extraction mode - export a live database schema as DBSteward XML | ||
<keyword>--dbdatadiff=</keyword><value><againstdatabase.xml></value><keyword> ...</keyword> | ||
<keyword>--dbhost=</keyword><value><hostname></value> the database host to connect to | ||
<keyword>--dbport=</keyword><value><port></value> the database port to connect to | ||
<keyword>--dbname=</keyword><value><name></value> the database name to connect to | ||
mysql5: a comma-separated list may be given, each will be extracted as its | ||
own "schema" in the resulting XML | ||
<keyword>--dbuser=</keyword><value><username></value> the database user to connect as | ||
<keyword>--dbpassword[=</keyword><value><password></value><keyword>]</keyword> the password to authenticate with. If no value is given, the empty password | ||
is used. If omitted entirely, you will be prompted for a password. | ||
|
||
<header>XML utilities</header> | ||
<keyword>--xmlsort=</keyword><value><database.xml></value><keyword> ...</keyword> | ||
<keyword>--xmlconvert=</keyword><value><database.xml></value><keyword> ...</keyword> | ||
<keyword>--xmldatainsert=</keyword><value><tabledata.xml></value> | ||
<keyword>--xmlcollectdataaddendums=</keyword><value>N</value> collect the last N xml files specified during a build into an aggregate file. | ||
this is useful for advanced deployment strategies and out-of-band processing. | ||
|
||
<header>Output options</header> | ||
<keyword>--outputdir</keyword> directory to write all output files. default is location of --xml or --newxml file | ||
<keyword>--outputfileprefix</keyword> output file prefix to use for artifact files. default is first XML file basename | ||
|
||
<header>SQL diffing</header> | ||
<keyword>--oldsql=</keyword><value><old.sql></value><keyword> ...</keyword> | ||
<keyword>--newsql=</keyword><value><old.sql></value><keyword> ...</keyword> | ||
<keyword>--outputfile=</keyword><value><outputfile.ext></value> | ||
|
||
<header>Slony utils</header> | ||
<keyword>--requireslonyid</keyword> require tables and sequences to specify a valid slonyId | ||
<keyword>--requireslonysetid</keyword> require slonyIds to be associated with a slonySetId | ||
<keyword>--generateslonik</keyword> generate slonik scripts to subscribe to or upgrade slony replicated db | ||
<keyword>--slonikconvert=</keyword><value><slonyconfig.slonik></value> | ||
<keyword>--slonycompare=</keyword><value><database.xml></value><keyword> ...</keyword> generate table SELECT statements for database health comparison between replicas | ||
<keyword>--slonydiffold=</keyword><value><olddatabase.xml></value><keyword> ...</keyword> compare table slonyId assignment between two versions of a database definition | ||
<keyword>--slonydiffnew=</keyword><value><newdatabase.xml></value><keyword> ...</keyword> | ||
<keyword>--slonyidin=</keyword><value><database.xml></value> read this file's definition | ||
<keyword>--slonyidout=</keyword><value><compositeoutput.xml></value> output it here with slonyids specified, based on requireslonyid and requireslonysetid | ||
<keyword>--slonyidstartvalue=</keyword><value>N</value> start slony IDs at this number | ||
<keyword>--slonyidsetvalue=</keyword><value>N</value> use this slony set ID for any unspecified slonySetId attributes | ||
|
||
<header>Format-specific options</header> | ||
<keyword>--useautoincrementoptions</keyword> mysql5: Apply AUTO_INCREMENT tableOptions. By default these are ignored. | ||
<keyword>--useschemaprefix</keyword> mysql5: Instead of merging schemas together (mysql5 default behavior), | ||
prefix each database object with the schema name. |