diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-09-14 21:13:01 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-09-14 21:13:01 +0000 |
commit | 318ce81a58cf522407b5dc52e61de59187a8b24e (patch) | |
tree | dbb1a79dd9f80b038c2e07398568b5bc51073174 | |
parent | a82b5143cfb0c3ddbf9ff9d4a0da341fd2a3e433 (diff) | |
download | brdo-318ce81a58cf522407b5dc52e61de59187a8b24e.tar.gz brdo-318ce81a58cf522407b5dc52e61de59187a8b24e.tar.bz2 |
updates.inc:
Fixing some missing db prefix braces and some bad indentation. Adding a TODO for PGSQL to update_105.
-rw-r--r-- | database/updates.inc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/database/updates.inc b/database/updates.inc index c11fa18fb..9489780dc 100644 --- a/database/updates.inc +++ b/database/updates.inc @@ -1752,26 +1752,27 @@ function update_104() { } function update_105() { + // TODO: needs PGSQL equivalent $ret = array(); $shadowupdates = db_query("SELECT nid,tid FROM {forum} WHERE shadow=0"); while ($shadowrecord = db_fetch_object($shadowupdates)) { - db_query("DELETE FROM term_node WHERE nid = %d AND tid <> %d", $shadowrecord->nid, $shadowrecord->tid); + db_query("DELETE FROM {term_node} WHERE nid = %d AND tid <> %d", $shadowrecord->nid, $shadowrecord->tid); } $ret[] = update_sql("ALTER TABLE {forum} DROP shadow"); - $ret[] = update_sql('ALTER TABLE node ADD INDEX node_status_type (status, type, nid)'); - - $ret[] = update_sql("CREATE TABLE node_comment_statistics ( - nid int(10) unsigned NOT NULL auto_increment, - cid int(10) unsigned NOT NULL default '0', - last_comment_timestamp int(11) NOT NULL default '0', - last_comment_name varchar(60) default NULL, - last_comment_uid int(10) NOT NULL default '0', - comment_count int(10) unsigned NOT NULL default '0', - PRIMARY KEY (nid), - KEY node_comment_timestamp (last_comment_timestamp) -) TYPE=MyISAM"); + $ret[] = update_sql('ALTER TABLE {node} ADD INDEX node_status_type (status, type, nid)'); + + $ret[] = update_sql("CREATE TABLE {node_comment_statistics} ( + nid int(10) unsigned NOT NULL auto_increment, + cid int(10) unsigned NOT NULL default '0', + last_comment_timestamp int(11) NOT NULL default '0', + last_comment_name varchar(60) default NULL, + last_comment_uid int(10) NOT NULL default '0', + comment_count int(10) unsigned NOT NULL default '0', + PRIMARY KEY (nid), + KEY node_comment_timestamp (last_comment_timestamp) + ) TYPE=MyISAM"); $ret[] = update_sql("INSERT INTO {node_comment_statistics} (nid, cid, last_comment_timestamp, last_comment_name, last_comment_uid, comment_count) SELECT n.nid, 0, n.created, NULL, n.uid, 0 FROM {node} n"); $ret[] = update_sql("CREATE TABLE {forum_conv_temp} ( |