Skip to content
Trevor DeVore edited this page Jul 28, 2018 · 2 revisions

sqlyogadev_enableLogging

Type: command

Syntax: sqlyogadev_enableLogging <pBoolean>,<pConnectionName>,<pDBKey>

Summary: Turns on logging using the Levure logging helper.

Description:

All log entries generated by SQL Yoga will be prefixed with "sqlYoga:"


sqlyogadev_reloadConfigFiles

Type: command

Syntax: sqlyogadev_reloadConfigFiles

Summary: Reloads all of the SQL Yoga configuration files.

Description:

This handler is useful for reloading configuration files after you modify them.


sqlyogadev_runMigrations

Type: command

Syntax: sqlyogadev_runMigrations <pConnectionName>,<pDBKey>

Summary: Runs all migrations in the migrate folder that have not been applied to the current connection.

Description:

This handler will loop through all files in the migrate folder. The schema version for the migration will be determined by the numbers at the front of the filename. Each number is compared against the current schema table version column value. If the version of the migration is greater than the version of the column value then the migration is applied to the database.

After running the last migration the version of the migration is stored in the schema table version column.


sqlyogadev_saveSchemaToYAML

Type: command

Syntax: sqlyogadev_saveSchemaToYAML <pDBKey>

Summary: Saves the current schema for a database to a YAML file.

Description:

SQL Yoga will load the schema.yml file if present and use that to define the table objects for the database. If the schema.yml file is not present then the first time a connection is made to the database the tables and columns will be extracted from the database.

A schema.yml can be used to create a new database. Just create a connection to an empty database and call dbsynch_databaseWithSchema.