_db_create_keys

Versions
6
_db_create_keys(&$ret, $table, $new_keys)

Code

includes/database.pgsql.inc, line 550

<?php
function _db_create_keys(&$ret, $table, $new_keys) {
  if (isset($new_keys['primary key'])) {
    db_add_primary_key($ret, $table, $new_keys['primary key']);
  }
  if (isset($new_keys['unique keys'])) {
    foreach ($new_keys['unique keys'] as $name => $fields) {
      db_add_unique_key($ret, $table, $name, $fields);
    }
  }
  if (isset($new_keys['indexes'])) {
    foreach ($new_keys['indexes'] as $name => $fields) {
      db_add_index($ret, $table, $name, $fields);
    }
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.