summaryrefslogtreecommitdiff
path: root/database/updates.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-05-09 14:42:08 +0000
committerDries Buytaert <dries@buytaert.net>2006-05-09 14:42:08 +0000
commit88723451becc5e55d1521e7bb70f837e3104499f (patch)
tree4368c732452b78cafa68a2532f748a2ff7f1f179 /database/updates.inc
parentb28ce3b0b1ac5c5f4cfd8082a80bb66ae618d7b4 (diff)
downloadbrdo-88723451becc5e55d1521e7bb70f837e3104499f.tar.gz
brdo-88723451becc5e55d1521e7bb70f837e3104499f.tar.bz2
- Patch #62478 by Matt: database schema cleanup.
Diffstat (limited to 'database/updates.inc')
-rw-r--r--database/updates.inc19
1 files changed, 19 insertions, 0 deletions
diff --git a/database/updates.inc b/database/updates.inc
index 83b23aff3..658f7103d 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -1954,3 +1954,22 @@ function system_update_179() {
return array();
}
+
+function system_update_180() {
+ $ret = array();
+
+ if ($GLOBALS['db_type'] == 'mysql') {
+ $ret[] = update_sql("ALTER TABLE {node} DROP PRIMARY KEY");
+ $ret[] = update_sql("ALTER TABLE {node} ADD PRIMARY KEY (nid, vid)");
+ $ret[] = update_sql("ALTER TABLE {node} DROP INDEX vid");
+ $ret[] = update_sql("ALTER TABLE {node} ADD UNIQUE (vid)");
+ $ret[] = update_sql("ALTER TABLE {node} ADD INDEX (nid)");
+
+ $ret[] = update_sql("ALTER TABLE {node_counter} CHANGE nid nid INT(10) NOT NULL DEFAULT '0'");
+ }
+ else { // pgsql
+ // Insert queries here.
+ }
+
+ return $ret;
+}