skeema format [<options>] [<environment>]
Reformats the filesystem representation of database objects to match the canonical format shown in SHOW CREATE.
This command relies on accessing database instances to test the SQL DDL in a temporary location. See the workspace option for more information.
You may optionally pass an environment name as a CLI arg. This will affect which section of .skeema config files is used for workspace selection. For example, running
skeema format staging will apply config directives from the [staging] section of config files, as well as any sectionless directives at the top of the file. If no environment name is supplied, the default is “production”.
An exit code of 0 will be returned if all files were already formatted properly; 1 if some files were not already in the correct format; or 2+ if any errors occurred.
|strip-partitioning||Remove PARTITION BY clauses from *.sql files|
|update-views||Reformat views in canonical single-line form|
|write||Update files to correct format (enabled by default; disable with skip-write)|
|docker-cleanup||With workspace=docker, specifies how to clean up containers|
|temp-schema||Name of temporary schema for intermediate operations, created and dropped each run|
|temp-schema-binlog||Controls whether temp schema DDL operations are replicated|
|temp-schema-threads||Max number of concurrent CREATE/DROP with workspace=temp-schema|
|workspace||Specifies where to run intermediate operations|
|connect-options||Comma-separated session options to set upon connecting to each database instance|
|debug||Enable debug logging|
|help||Display usage information for the specified command|
|host-wrapper||External bin to shell out to for host lookup; see manual for template vars|
|ignore-schema||Ignore schemas that match regex|
|ignore-table||Ignore tables that match regex|
|ignore-trigger||Ignore triggers that match regex|
|my-cnf||Parse ~/.my.cnf for configuration (enabled by default; disable with skip-my-cnf)|
|password||Password for database user; omit value to prompt from TTY (default no password)|
|user||Username to connect to database host|
|version||Display program version|