summaryrefslogtreecommitdiff
path: root/update.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-04-20 20:33:28 +0000
committerDries Buytaert <dries@buytaert.net>2003-04-20 20:33:28 +0000
commit3c2dc18c82fd6fc19d5e2e26bc1f28b0048f89a8 (patch)
treee8895044a66e4a2d330daa1844f8e74aba6a3025 /update.php
parentb85cf71962c7b0231994131258053916b9ed73cb (diff)
downloadbrdo-3c2dc18c82fd6fc19d5e2e26bc1f28b0048f89a8.tar.gz
brdo-3c2dc18c82fd6fc19d5e2e26bc1f28b0048f89a8.tar.bz2
- Fixed bug #1545: incorrect sequence tables on PostgreSQL. Patch by Neil.
In addition, I have updated update.php so it makes the corresponding changes for MySQL users.
Diffstat (limited to 'update.php')
-rw-r--r--update.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/update.php b/update.php
index a0c02d162..fdc8c7f72 100644
--- a/update.php
+++ b/update.php
@@ -63,7 +63,8 @@ $mysql_updates = array(
"2003-01-03" => "update_48",
"2003-01-05" => "update_49",
"2003-01-15" => "update_50",
- "2003-04-19" => "update_51"
+ "2003-04-19" => "update_51",
+ "2003-04-20" => "update_52"
);
// Update functions
@@ -684,6 +685,25 @@ function update_51() {
update_sql("ALTER TABLE blocks CHANGE delta delta varchar(32) NOT NULL default '0'");
}
+function update_52() {
+ update_sql("UPDATE sequences SET name = 'comments_cid' WHERE name = 'comments';");
+ update_sql("UPDATE sequences SET name = 'node_nid' WHERE name = 'node';");
+
+ update_sql("DELETE FROM sequences WHERE name = 'import'");
+ update_sql("DELETE FROM sequences WHERE name = 'bundle_bid'"); // in case we would run this entry twice
+ update_sql("DELETE FROM sequences WHERE name = 'feed_fid'"); // in case we would run this entry twice
+
+ $bundles = db_result(db_query("SELECT MAX(bid) FROM bundle;"));
+ update_sql("INSERT INTO sequences (name, id) VALUES ('bundle_bid', '$bundles')");
+
+ $feeds = db_result(db_query("SELECT MAX(fid) FROM feed;"));
+ update_sql("INSERT INTO sequences (name, id) VALUES ('feed_fid', '$feeds')");
+
+ update_sql("UPDATE sequences SET name = 'vocabulary_vid' WHERE name = 'vocabulary';");
+
+ update_sql("UPDATE sequences SET name = 'term_data_tid' WHERE name = 'term_data'");
+}
+
function update_upgrade3() {
update_sql("INSERT INTO system VALUES ('archive.module','archive','module','',1)");
update_sql("INSERT INTO system VALUES ('block.module','block','module','',1)");