- Patch #45747 by Cvbge: documentation improvement + added primary key that got lost
parent
b6b98bb60d
commit
e21b5be8d8
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue