diff options
Diffstat (limited to 'modules/system')
-rw-r--r-- | modules/system/system.install | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 46ded8dbf..77c566bed 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -759,8 +759,8 @@ function system_schema() { 'not null' => TRUE, 'default' => '', ), - 'hostname' => array( - 'description' => 'Hostname of the visitor.', + 'identifier' => array( + 'description' => 'Identifier of the visitor, such as an IP address or hostname.', 'type' => 'varchar', 'length' => 128, 'not null' => TRUE, @@ -775,7 +775,7 @@ function system_schema() { ), 'primary key' => array('fid'), 'indexes' => array( - 'allow' => array('event', 'hostname', 'timestamp'), + 'allow' => array('event', 'identifier', 'timestamp'), ), ); @@ -2234,6 +2234,17 @@ function system_update_7031() { } /** +* Alter field hostname to identifier in the {flood} table. + */ +function system_update_7032() { + $ret = array(); + db_drop_index($ret, 'flood', 'allow'); + db_change_field($ret, 'flood', 'hostname', 'identifier', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => '')); + db_add_index($ret, 'flood', 'allow', array('event', 'identifier', 'timestamp')); + return $ret; +} + +/** * @} End of "defgroup updates-6.x-to-7.x" * The next series of updates should start at 8000. */ |