Schema::fieldSetDefault

public Schema::fieldSetDefault($table, $field, $default) Set the default value for a field. Parameters $table: The table to be altered. $field: The field to be altered. $default: Default value to be set. NULL for 'default NULL'. Throws \Drupal\Core\Database\SchemaObjectDoesNotExistException If the specified table or field doesn't exist. Overrides Schema::fieldSetDefault File core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 689 Class Schema SQLite implementation of \Drupal\Cor

Schema::fieldSetDefault

public Schema::fieldSetDefault($table, $field, $default) Set the default value for a field. Parameters $table: The table to be altered. $field: The field to be altered. $default: Default value to be set. NULL for 'default NULL'. Throws \Drupal\Core\Database\SchemaObjectDoesNotExistException If the specified table or field doesn't exist. Overrides Schema::fieldSetDefault File core/lib/Drupal/Core/Database/Driver/mysql/Schema.php, line 434 Class Schema MySQL implementation of \Drupal\Core\

Schema::fieldSetDefault

abstract public Schema::fieldSetDefault($table, $field, $default) Set the default value for a field. Parameters $table: The table to be altered. $field: The field to be altered. $default: Default value to be set. NULL for 'default NULL'. Throws \Drupal\Core\Database\SchemaObjectDoesNotExistException If the specified table or field doesn't exist. File core/lib/Drupal/Core/Database/Schema.php, line 352 Class Schema Provides a base implementation for Database Schema. Namespace Drupal\Cor

Schema::fieldNames

public Schema::fieldNames($fields) Return an array of field names from an array of key/index column specifiers. This is usually an identity function but if a key/index uses a column prefix specification, this function extracts just the name. Parameters $fields: An array of key/index column specifiers. Return value An array of field names. File core/lib/Drupal/Core/Database/Schema.php, line 614 Class Schema Provides a base implementation for Database Schema. Namespace Drupal\Core\Datab

Schema::fieldExists

public Schema::fieldExists($table, $column) Check if a column exists in the given table. Parameters $table: The name of the table in drupal (no prefixing). $name: The name of the column. Return value TRUE if the given column exists, otherwise FALSE. Overrides Schema::fieldExists File core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 32 Class Schema SQLite implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\sqlite Code public function field

Schema::fieldExists

public Schema::fieldExists($table, $column) Check if a column exists in the given table. Parameters $table: The name of the table in drupal (no prefixing). $name: The name of the column. Return value TRUE if the given column exists, otherwise FALSE. Overrides Schema::fieldExists File core/lib/Drupal/Core/Database/Driver/mysql/Schema.php, line 584 Class Schema MySQL implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\mysql Code public function fieldEx

Schema::fieldExists

public Schema::fieldExists($table, $column) Check if a column exists in the given table. Parameters $table: The name of the table in drupal (no prefixing). $name: The name of the column. Return value TRUE if the given column exists, otherwise FALSE. File core/lib/Drupal/Core/Database/Schema.php, line 244 Class Schema Provides a base implementation for Database Schema. Namespace Drupal\Core\Database Code public function fieldExists($table, $column) { $condition = $this->buildTabl

Schema::escapeDefaultValue

protected Schema::escapeDefaultValue($value) Return an escaped version of its parameter to be used as a default value on a column. Parameters mixed $value: The value to be escaped (int, float, null or string). Return value string|int|float The escaped value. File core/lib/Drupal/Core/Database/Schema.php, line 654 Class Schema Provides a base implementation for Database Schema. Namespace Drupal\Core\Database Code protected function escapeDefaultValue($value) { if (is_null($value)) {

Schema::ensureIdentifiersLength

protected Schema::ensureIdentifiersLength($identifier) Make sure to limit identifiers according to PostgreSQL compiled in length. PostgreSQL allows in standard configuration no longer identifiers than 63 chars for table/relation names, indexes, primary keys, and constraints. So we map all identifiers that are too long to drupal_base64hash_tag, where tag is one of: idx for indexes key for constraints pkey for primary keys Parameters $identifiers: The arguments to build the identifier string R

Schema::dropUniqueKey

public Schema::dropUniqueKey($table, $name) Drop a unique key. Parameters $table: The table to be altered. $name: The name of the key. Return value TRUE if the key was successfully dropped, FALSE if there was no key by that name to begin with. Overrides Schema::dropUniqueKey File core/lib/Drupal/Core/Database/Driver/pgsql/Schema.php, line 654 Class Schema PostgreSQL implementation of \Drupal\Core\Database\Schema. Namespace Drupal\Core\Database\Driver\pgsql Code public function dropUn