| Versionen | |
|---|---|
| drupal7 | public DatabaseSchema_sqlite::addPrimaryKey(&$ret, $table, $fields) |
Add a primary key.
This implementation can't use ALTER TABLE directly, because SQLite only supports a limited subset of that command.
$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) {
$new_schema = $this->introspectSchema($table);
$new_schema['primary key'] = $fields;
$this->alterTable($ret, $table, $new_schema);
}
?>
Kommentare
Kommentar hinzufügen