function data_ui_adjust_form_submit_update_schema in Data 6
Same name and namespace in other branches
- 7 data_ui/data_ui.admin.inc \data_ui_adjust_form_submit_update_schema()
Submit handler for data_ui_adjust_form().
1 string reference to 'data_ui_adjust_form_submit_update_schema'
- data_ui_adjust_form in data_ui/
data_ui.admin.inc - Adjust table schema form: Present the user with the difference between schema information and the actual schema in the Database and offer three options:
File
- data_ui/
data_ui.admin.inc, line 177 - Admin UI functions.
Code
function data_ui_adjust_form_submit_update_schema($form, &$form_state) {
$table = $form['#table'];
$schema = schema_invoke('inspect');
if (isset($schema[$table
->get('name')])) {
$table
->update(array(
'table_schema' => $schema[$table
->get('name')],
));
drupal_set_message(t('Updated schema for @table', array(
'@table' => $table
->get('name'),
)));
}
else {
drupal_set_message(t('Error updating schema'), 'error');
}
}