Property | Type | Description | |
---|---|---|---|
$_charset | not supported | ||
$_collate | only UTF_8 supported | ||
$_engine | Driver-Specific settings | ||
$_fieldTypeMap | @todo Have to improve this to allow custom types, callbacks, and validation | ||
$_format_date | Format for date columns, formatted for PHP's date() function | ||
$_format_datetime | |||
$_format_time |
Method | Description | |
---|---|---|
connection ( ) : object | Get database connection | |
escapeField ( $field ) | Escape/quote direct user input | |
migrate ( String $table, array $fields, array $options = [] ) | Migrate table structure changes to database | |
migrateSyntaxFieldCreate ( string $fieldName, array $fieldInfo ) : string | Syntax for each column in CREATE TABLE command | |
migrateSyntaxFieldUpdate ( string $fieldName, array $fieldInfo, $add = false ) : string | Syntax for each column in CREATE TABLE command | |
migrateSyntaxTableCreate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : string | Syntax for CREATE TABLE with given fields and column syntax | |
migrateSyntaxTableUpdate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : string | Syntax for ALTER TABLE with given fields and column syntax | |
truncateDatasource ( $datasource ) | Truncate a database table Should delete all rows and reset serial/auto_increment keys to 0 |
Method | Description | |
---|---|---|
getColumnsForTable ( String $table, string $source ) : Array | Get columns for current table | |
shouldUpdateMigrateField ( $formattedField, $columnInfo ) |
protected getColumnsForTable ( String $table, string $source ) : Array | ||
$table | String | Table name |
$source | string | |
return | Array |
public migrateSyntaxTableCreate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : string | ||
$table | string | Table name |
$formattedFields | array | Array of fields with all settings |
$columnsSyntax | array | Array of SQL syntax of columns produced by 'migrateSyntaxFieldCreate' function |
$options | array | Options that may affect migrations or how tables are setup |
return | string | SQL syntax |
public migrateSyntaxTableUpdate ( string $table, array $formattedFields, array $columnsSyntax, array $options ) : string | ||
$table | string | Table name |
$formattedFields | array | Array of fields with all settings |
$columnsSyntax | array | Array of SQL syntax of columns produced by 'migrateSyntaxFieldUpdate' function |
$options | array | |
return | string | SQL syntax |
protected shouldUpdateMigrateField ( $formattedField, $columnInfo ) |
public truncateDatasource ( $datasource ) |
protected $_fieldTypeMap |
protected $_format_date |