function DatabaseSchema_pgsql::_createKeys
2 calls to DatabaseSchema_pgsql::_createKeys()
- DatabaseSchema_pgsql::addField in includes/
database/ pgsql/ schema.inc - Add a new field to a table.
- DatabaseSchema_pgsql::changeField in includes/
database/ pgsql/ schema.inc - Change a field definition.
File
-
includes/
database/ pgsql/ schema.inc, line 795
Class
Code
protected function _createKeys($table, $new_keys) {
if (isset($new_keys['primary key'])) {
$this->addPrimaryKey($table, $new_keys['primary key']);
}
if (isset($new_keys['unique keys'])) {
foreach ($new_keys['unique keys'] as $name => $fields) {
$this->addUniqueKey($table, $name, $fields);
}
}
if (isset($new_keys['indexes'])) {
foreach ($new_keys['indexes'] as $name => $fields) {
$this->addIndex($table, $name, $fields);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.