Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

CreateOrUpdateExistingTableFromSchemaDefinitionArrayUtil Class Reference

Static Public Member Functions

static getTableSchema ($tableName, $columns=array(), $indexes=array())
static generateOrUpdateTableBySchemaDefinition (array $schemaDefinition, &$messageLogger, $validate=true)
static resolveProcessedTables ()

Data Fields

const CACHE_KEY = 'CreateOrUpdateExistingTableFromSchemaDefinitionArrayUtil_processedTableNames'

Static Protected Member Functions

static validateSchemaDefinition (array $schemaDefinition)
static validateColumnDefinitionsFromSchema (array $columns)
static validateIndexDefinitionsFromSchema (array $indexes, array $columns)
static resolveAlterQueryForColumn ($column)
static resolveColumnUpgradeQueries ($columns, $existingFields)
static doesIndexNeedUpgrade ($indexMetadata, $existingIndexes)
static resolveIndexUpgradeQueries ($indexes, $existingIndexes)
static resolveAlterTableQuery ($tableName, $columnsAndIndexes, $existingFields, $existingIndexes)
static resolveColumnUpgradeDefinition ($column, $existingFields)
static doesColumnNeedUpgrade ($column, $existingField)
static isColumnTypeSameAsExistingFieldOrSmaller ($column, $existingField)
static isColumnLengthShrinkOrConversionToUnsigned ($columnLength, $fieldLength, $columnUnsigned, $fieldUnsigned)
static isColumnTypeSmallerThanExistingFieldType ($columnType, $fieldType)
static resolveExistingFieldTypeAndLengthAndUsigned (array $existingField)
static resolveColumnTypeAndLength ($columnTypeAndLength)
static isColumnTypeSameAsExistingField ($column, $existingField)
static isColumnNullSameAsExistingField ($column, $existingField)
static isColumnDefaultValueSameAsExistingField ($column, $existingField)
static resolveCreateTableQuery ($tableName, $columnsAndIndexesSchema)
static resolveColumnStatementFromDefinition ($column, $isAddition=true)
static resolveIndexStatementCreation ($indexName, $indexMetadata, $alterTable=false)
static returnSchemaValidationResult ($message, $isValid=false)

Detailed Description

Utility to generate or update a table in database when provided with a database schema in array format

Definition at line 40 of file CreateOrUpdateExistingTableFromSchemaDefinitionArrayUtil.php.


Member Function Documentation

static getTableSchema ( tableName,
columns = array(),
indexes = array() 
) [static]

Returns table schema definition

Parameters:
$tableName 
array $columns
array $indexes
Returns:
array $schema

Definition at line 51 of file CreateOrUpdateExistingTableFromSchemaDefinitionArrayUtil.php.

static generateOrUpdateTableBySchemaDefinition ( array $  schemaDefinition,
&$  messageLogger,
validate = true 
) [static]

Provide a schema definition array queries to create/update database schema are executed.

Parameters:
array $schemaDefinition
$messageLogger 
$validate 
Exceptions:
CException 
Exception|RedBean_Exception_SQL 

Definition at line 70 of file CreateOrUpdateExistingTableFromSchemaDefinitionArrayUtil.php.

static resolveProcessedTables (  )  [static]

Returns an array of processed tables.

Returns:
array

Definition at line 136 of file CreateOrUpdateExistingTableFromSchemaDefinitionArrayUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Fri Jan 18 07:10:23 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8