summaryrefslogtreecommitdiff
path: root/database/updates.inc
diff options
context:
space:
mode:
Diffstat (limited to 'database/updates.inc')
-rw-r--r--database/updates.inc16
1 files changed, 16 insertions, 0 deletions
diff --git a/database/updates.inc b/database/updates.inc
index d4b440f3d..10a73f3d7 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -1397,3 +1397,19 @@ function system_update_166() {
return $ret;
}
+
+function system_update_167() {
+ $ret = array();
+ switch ($GLOBALS['db_type']) {
+ case 'pgsql':
+ db_add_column($ret, 'system', 'weight', 'smallint', array('not null' => TRUE, 'default' => 0));
+ $ret[] = update_sql('CREATE INDEX {system}_weight_idx ON {system} (weight)');
+ break;
+ case 'mysql':
+ case 'mysqli':
+ $ret[] = update_sql("ALTER TABLE {system} ADD weight tinyint(3) unsigned default '0' NOT NULL, ADD KEY (weight)");
+ break;
+ }
+
+ return $ret;
+}