| Versionen | |
|---|---|
| drupal7 | public DatabaseSchema_pgsql::addPrimaryKey(&$ret, $table, $fields) |
Add a primary key.
$ret Array to which query results will be added.
$table The table to be altered.
$fields Fields for the primary key.
includes/
<?php
public function addPrimaryKey(&$ret, $table, $fields) {
$ret[] = update_sql('ALTER TABLE {' . $table . '} ADD PRIMARY KEY (' . implode(',', $fields) . ')');
}
?>
Kommentare
Kommentar hinzufügen