Skip to content
Snippets Groups Projects
Commit 318ce81a authored by Steven Wittens's avatar Steven Wittens
Browse files

updates.inc:

Fixing some missing db prefix braces and some bad indentation. Adding a TODO for PGSQL to update_105.
parent a82b5143
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -1752,17 +1752,18 @@ function update_104() { ...@@ -1752,17 +1752,18 @@ function update_104() {
} }
function update_105() { function update_105() {
// TODO: needs PGSQL equivalent
$ret = array(); $ret = array();
$shadowupdates = db_query("SELECT nid,tid FROM {forum} WHERE shadow=0"); $shadowupdates = db_query("SELECT nid,tid FROM {forum} WHERE shadow=0");
while ($shadowrecord = db_fetch_object($shadowupdates)) { 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 {forum} DROP shadow");
$ret[] = update_sql('ALTER TABLE node ADD INDEX node_status_type (status, type, nid)'); $ret[] = update_sql('ALTER TABLE {node} ADD INDEX node_status_type (status, type, nid)');
$ret[] = update_sql("CREATE TABLE node_comment_statistics ( $ret[] = update_sql("CREATE TABLE {node_comment_statistics} (
nid int(10) unsigned NOT NULL auto_increment, nid int(10) unsigned NOT NULL auto_increment,
cid int(10) unsigned NOT NULL default '0', cid int(10) unsigned NOT NULL default '0',
last_comment_timestamp int(11) NOT NULL default '0', last_comment_timestamp int(11) NOT NULL default '0',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment