diff options
Diffstat (limited to 'database/updates.inc')
-rw-r--r-- | database/updates.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/database/updates.inc b/database/updates.inc index ae2932d94..8dab69b03 100644 --- a/database/updates.inc +++ b/database/updates.inc @@ -1307,9 +1307,12 @@ function update_95() { function update_96() { $ret = array(); - $ret[] = update_sql('ALTER TABLE {accesslog} DROP nid'); - $ret[] = update_sql('ALTER TABLE {accesslog} ADD title VARCHAR(255) DEFAULT NULL'); $ret[] = update_sql('ALTER TABLE {accesslog} ADD path VARCHAR(255) DEFAULT NULL'); + $ret[] = update_sql('UPDATE {accesslog} SET path = CONCAT("node/", nid) WHERE nid != 0'); + $ret[] = update_sql('ALTER TABLE {accesslog} ADD title VARCHAR(255) DEFAULT NULL'); + /* Only supported by MySQL 4.0.4 and up + $ret[] = update_sql('UPDATE {accesslog} a, {node} n SET a.title = n.title WHERE a.nid = n.nid');*/ + $ret[] = update_sql('ALTER TABLE {accesslog} DROP nid'); if ($GLOBALS['db_type'] == 'mysql') { $ret[] = update_sql("ALTER TABLE {menu} ADD description varchar(255) DEFAULT '' NOT NULL"); |