Schema::createFieldSql

protected Schema::createFieldSql($name, $spec) Create an SQL string for a field to be used in table creation or alteration. Before passing a field out of a schema definition into this function it has to be processed by _db_process_field(). Parameters string $name: Name of the field. array $spec: The field specification, as per the schema data structure format. File core/lib/Drupal/Core/Database/Driver/mysql/Schema.php, line 147 Class Schema MySQL implementation of \Drupal\Core\Database\Sc

Schema::createColumnsSql

protected Schema::createColumnsSql($tablename, $schema) Build the SQL expression for creating columns. File core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 75 Class Schema SQLite implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\sqlite Code protected function createColumnsSql($tablename, $schema) { $sql_array = array(); // Add the SQL statement for each field. foreach ($schema['fields'] as $name => $field) { if (isset($fiel

Schema::constraintExists

public Schema::constraintExists($table, $name) Helper function: check if a constraint (PK, FK, UK) exists. Parameters string $table: The name of the table. string $name: The name of the constraint (typically 'pkey' or '[constraint]__key'). Return value bool TRUE if the constraint exists, FALSE otherwise. File core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php, line 600 Class Schema PostgreSQL implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\pgsq

Schema::COMMENT_MAX_TABLE

Maximum length of a table comment in MySQL. File core/lib/Drupal/Core/Database/Driver/mysql/Schema.php, line 25 Class Schema MySQL implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\mysql Code const COMMENT_MAX_TABLE = 60;

Schema::COMMENT_MAX_COLUMN

Maximum length of a column comment in MySQL. File core/lib/Drupal/Core/Database/Driver/mysql/Schema.php, line 30 Class Schema MySQL implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\mysql Code const COMMENT_MAX_COLUMN = 255;

Schema::changeField

public Schema::changeField($table, $field, $field_new, $spec, $new_keys = array()) Change a field definition. IMPORTANT NOTE: To maintain database portability, you have to explicitly recreate all indices and primary keys that are using the changed field. That means that you have to drop all affected keys and indexes with db_drop_{primary_key,unique_key,index}() before calling db_change_field(). To recreate the keys and indices, pass the key definitions as the optional $keys_new argument directl

Schema::changeField

public Schema::changeField($table, $field, $field_new, $spec, $keys_new = array()) Change a field definition. IMPORTANT NOTE: To maintain database portability, you have to explicitly recreate all indices and primary keys that are using the changed field. That means that you have to drop all affected keys and indexes with db_drop_{primary_key,unique_key,index}() before calling db_change_field(). To recreate the keys and indices, pass the key definitions as the optional $keys_new argument directl

Schema::changeField

public Schema::changeField($table, $field, $field_new, $spec, $keys_new = array()) Change a field definition. IMPORTANT NOTE: To maintain database portability, you have to explicitly recreate all indices and primary keys that are using the changed field. That means that you have to drop all affected keys and indexes with db_drop_{primary_key,unique_key,index}() before calling db_change_field(). To recreate the keys and indices, pass the key definitions as the optional $keys_new argument directl

Schema::changeField

abstract public Schema::changeField($table, $field, $field_new, $spec, $keys_new = array()) Change a field definition. IMPORTANT NOTE: To maintain database portability, you have to explicitly recreate all indices and primary keys that are using the changed field. That means that you have to drop all affected keys and indexes with db_drop_{primary_key,unique_key,index}() before calling db_change_field(). To recreate the keys and indices, pass the key definitions as the optional $keys_new argumen

Schema::buildTableNameCondition

protected Schema::buildTableNameCondition($table_name, $operator = '=', $add_prefix = TRUE) Build a condition to match a table name against a standard information_schema. MySQL uses databases like schemas rather than catalogs so when we build a condition to query the information_schema.tables, we set the default database as the schema unless specified otherwise, and exclude table_catalog from the condition criteria. Overrides Schema::buildTableNameCondition File core/lib/Drupal/Core/Database/Dr