function page_theme_update_6104 in Page Theme 6
Same name and namespace in other branches
- 7.2 page_theme.install \page_theme_update_6104()
- 7 page_theme.install \page_theme_update_6104()
Implementation of hook_update_N().
Add page theme ID field and update table indices.
File
- ./
page_theme.install, line 151 - Install, update and uninstall functions for the page_theme module.
Code
function page_theme_update_6104() {
$ret = array();
db_drop_primary_key($ret, 'page_theme');
db_add_field($ret, 'page_theme', 'ptid', array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
), array(
'primary key' => array(
'ptid',
),
));
db_add_unique_key($ret, 'page_theme', 'theme', array(
'theme',
));
db_add_index($ret, 'page_theme', 'list', array(
'theme',
'weight',
));
return $ret;
}