function shurly_update_6103 in ShURLy 6
Add hash to destination field for indexing.
File
- ./
shurly.install, line 182 - Shurly install file
Code
function shurly_update_6103() {
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)');
}