diff options
-rw-r--r-- | database/updates.inc | 1 | ||||
-rw-r--r-- | update.php | 7 |
2 files changed, 7 insertions, 1 deletions
diff --git a/database/updates.inc b/database/updates.inc index ea85798c7..d428a6714 100644 --- a/database/updates.inc +++ b/database/updates.inc @@ -1424,6 +1424,7 @@ function system_update_167() { break; case 'pgsql': db_change_column($ret, 'vocabulary_node_types', 'type', 'type', 'varchar(32)', array('not null' => TRUE, 'default' => "''")); + $ret[] = update_sql("ALTER TABLE {vocabulary_node_types} ADD PRIMARY KEY (vid, type)"); break; } diff --git a/update.php b/update.php index 136058f5a..55c345b1e 100644 --- a/update.php +++ b/update.php @@ -78,6 +78,11 @@ function db_add_column(&$ret, $table, $column, $type, $attributes = array()) { * Changes a column definition. Uses syntax appropriate for PostgreSQL. * Saves result of SQL commands in $ret array. * + * Please remember, that changing column definition involves adding new column + * and dropping old one. This means that any indexes, primary keys and + * sequences from the serial-type columns are dropped and might need to be + * recreated. + * * @param $ret * Array to which results will be added. * @param $table @@ -91,7 +96,7 @@ function db_add_column(&$ret, $table, $column, $type, $attributes = array()) { * @param $attributes * Additional optional attributes. Recognized atributes: * - not null => TRUE/FALSE - * - default => NULL/FALSE/value (with or without '', it wont' be added) + * - default => NULL/FALSE/value (with or without '', it won't be added) * @return * nothing, but modifies $ret parametr. */ |