protected function DatabaseSchema_mysql8b7c:f320:99b9:690f:4595:cd17:293a:c069reateKeysSql protected DatabaseSchema_mysql8b7c:f320:99b9:690f:4595:cd17:293a:c069reateKeysSql($spec) File
 includes/database/mysql/schema.inc, line 264 Database schema code for MySQL database servers.  Class
 
DatabaseSchema_mysql   Code protected function createKeysSql($spec) {
  $keys = array();

  if (!empty($spec['primary key'])) {
    $keys[] = 'PRIMARY KEY (' . $this->createKeysSqlHelper($spec['primary key']) . ')';
  }
  if (!empty($spec['unique keys'])) {
    foreach ($spec['unique keys'] as $key => $fields) {
      $keys[] = 'UNIQUE KEY `' . $key . '` (' . $this->createKeysSqlHelper($fields) . ')';
    }
  }
  if (!empty($spec['indexes'])) {
    foreach ($spec['indexes'] as $index => $fields) {
      $keys[] = 'INDEX `' . $index . '` (' . $this->createKeysSqlHelper($fields) . ')';
    }
  }

  return $keys;
}


    
{'path': 'public/docs/drupal~7/includes-database-mysql-schema.inc/function/databaseschema_mysql-createkeyssql/7.x.html', 'source': 'DevDocs.IO'}