Docs: Commands: pull

Usage: skeema pull [<options>] [<environment>]

Updates the existing filesystem representation of the schemas on a DB instance. Use this command when changes have been applied to the database manually or outside of Skeema, in order to make the filesystem representation reflect those changes.

You may optionally pass an environment name as a CLI arg. This will affect which section of .skeema config files is used for processing. For example, running skeema pull 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”.

Pull Options

OptionDescription
formatReformat SQL statements to match canonical SHOW CREATE (enabled by default; disable with skip-format)
include-auto-incInclude starting auto-inc values in new table files, and update in existing files
new-schemasDetect any new schemas and populate new dirs for them (enabled by default; disable with skip-new-schemas)
strip-definerOmit DEFINER clauses when writing procs, funcs, views, and triggers to filesystem
strip-partitioningOmit PARTITION BY clause when writing partitioned tables to filesystem
update-partitioningUpdate PARTITION BY clauses in existing table files
update-seed-insertsUpdate INSERTs based on result of querying _seed_* views
update-viewsUpdate definitions of existing views, using canonical form

Workspace Options

OptionDescription
docker-cleanupWith workspace=docker, specifies how to clean up containers
temp-schemaName of temporary schema for intermediate operations, created and dropped each run
temp-schema-binlogControls whether temp schema DDL operations are replicated
temp-schema-environmentOffload the temp schema to a different host, as configured by the specified environment
temp-schema-threadsMax number of concurrent CREATE/DROP with workspace=temp-schema
workspaceSpecifies where to run intermediate operations

Global Options

OptionDescription
connect-optionsComma-separated session options to set upon connecting to each database instance
debugEnable debug logging
helpDisplay usage information for the specified command
host-wrapperExternal bin to shell out to for host lookup; see manual for template vars
ignore-funcIgnore functions that match regex
ignore-procIgnore stored procedures that match regex
ignore-schemaIgnore schemas that match regex
ignore-tableIgnore tables or views that match regex
ignore-triggerIgnore triggers that match regex
ignore-viewIgnore views that match regex
my-cnfParse ~/.my.cnf for configuration (enabled by default; disable with skip-my-cnf)
passwordPassword for database user; omit value to prompt from TTY
server-public-key-pathFile path to server public key in PEM format; omit to obtain from server
sshTunnel MySQL connections thru SSH to this hostname or user@hostname:port
ssh-to-dbSSH to database host in order to establish database connections locally
ssl-caFile path to certificate authority in PEM format
ssl-certFile path to client-side public key in PEM format
ssl-keyFile path to client-side private key in PEM format
ssl-modeSpecify desired connection security SSL/TLS usage
ssl-verify-server-certVerify server-side cert matches server hostname
userUsername to connect to database host
versionDisplay program version