DatabaseSchema_pgsql::_createKeys

protected function DatabaseSchema_pgsql::_createKeys

protected DatabaseSchema_pgsql::_createKeys($table, $new_keys)

File

includes/database/pgsql/schema.inc, line 588
Database schema code for PostgreSQL database servers.

Class

DatabaseSchema_pgsql

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);
    }
  }
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!database!pgsql!schema.inc/function/DatabaseSchema_pgsql::_createKeys/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部