function themekey_ui_update_6200 in ThemeKey 7
Same name and namespace in other branches
- 6.4 themekey_ui.install \themekey_ui_update_6200()
- 6.2 themekey_ui.install \themekey_ui_update_6200()
- 6.3 themekey_ui.install \themekey_ui_update_6200()
- 7.3 themekey_ui.install \themekey_ui_update_6200()
- 7.2 themekey_ui.install \themekey_ui_update_6200()
Implements hook_update_N().
File
- ./
themekey_ui.install, line 104 - Database schema of
Code
function themekey_ui_update_6200() {
if (!db_table_exists('themekey_ui_author_theme')) {
$schema['themekey_ui_author_theme'] = array(
'fields' => array(
'uid' => array(
'description' => 'The user id.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'theme' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array(
'uid',
),
);
$ret = array();
db_create_table('themekey_ui_author_theme', $schema['themekey_ui_author_theme']);
// hook_update_N() no longer returns a $ret array. Instead, return
// nothing or a translated string indicating the update ran successfully.
// See http://drupal.org/node/224333#update_sql.
return t('Created table themekey_ui_author_theme');
}
else {
return '';
}
}