Skip to content
Snippets Groups Projects
Commit 5ca32b04 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#107824 by Frando, heyrocker, Dave Reid, AlexisWilke, andypost: the dblog...

#107824 by Frando, heyrocker, Dave Reid, AlexisWilke, andypost: the dblog referer and the statistics url columns were not in line with how we store URLs elsewhere (like the dblog location column); could result in data loss due to length truncation
parent 5fd1b667
No related branches found
No related tags found
No related merge requests found
......@@ -75,10 +75,8 @@ function dblog_schema() {
'description' => 'URL of the origin of the event.',
),
'referer' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
'type' => 'text',
'not null' => FALSE,
'description' => 'URL of referring page.',
),
'hostname' => array(
......@@ -102,3 +100,21 @@ function dblog_schema() {
return $schema;
}
/**
* @defgroup updates-5.x-to-6.x Database logging updates from 5.x to 6.x
* @{
*/
/**
* Allow longer referrers.
*/
function dblog_update_6000() {
$ret = array();
db_change_field($ret, 'watchdog', 'referer', 'referer', array('type' => 'text', 'not null' => FALSE));
return $ret;
}
/**
* @} End of "defgroup updates-5.x-to-6.x"
* The next series of updates should start at 7000.
*/
......@@ -76,8 +76,7 @@ function statistics_schema() {
'description' => 'Internal path to page visited (relative to Drupal root.)',
),
'url' => array(
'type' => 'varchar',
'length' => 255,
'type' => 'text',
'not null' => FALSE,
'description' => 'Referrer URI.',
),
......@@ -119,3 +118,21 @@ function statistics_schema() {
return $schema;
}
/**
* @defgroup updates-5.x-to-6.x Statistics updates from 5.x to 6.x
* @{
*/
/**
* Allow longer referrers.
*/
function statistics_update_6000() {
$ret = array();
db_change_field($ret, 'accesslog', 'url', 'url', array('type' => 'text', 'not null' => FALSE));
return $ret;
}
/**
* @} End of "defgroup updates-5.x-to-6.x"
* The next series of updates should start at 7000.
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment