-
Notifications
You must be signed in to change notification settings - Fork 4
SQL Yoga IDE API
- sqlyogadev_enableLogging
- sqlyogadev_reloadConfigFiles
- sqlyogadev_runMigrations
- sqlyogadev_saveSchemaToYAML
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:"
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.
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.
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
.
SQL Yoga USER GUIDE
- Home
- SQL Yoga Objects
- Database Objects
- Connection Objects
- SQL Query Objects
- SQL Record Objects
- Table Objects
- Table Object Behaviors
- Relationships
- Scopes
- Schema
- Working with User Search Strings
- SQL Query Template Objects
- Error Handling
- Migrating from SQL Yoga 1.x
- Integrating with the Levure Application Framework