protected function DatabaseSchema_pgsql::_createKeys in Drupal 7
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 588 - Database schema code for PostgreSQL database servers.
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);
}
}
}