function shurly_update_7102 in ShURLy 7
Add hash to destination field for indexing.
File
- ./
shurly.install, line 216 - Shurly install file
Code
function shurly_update_7102() {
db_add_field('shurly', 'hash', array(
'description' => t('The hash of the redirect URL'),
'type' => 'varchar',
'length' => '32',
'not null' => TRUE,
'default' => '',
), array(
'indexes' => array(
'hash' => array(
'hash',
),
),
));
db_query('UPDATE {shurly} SET hash = MD5(destination)');
}