function data_ui_adjust_form_submit_create_table in Data 6
Same name and namespace in other branches
- 7 data_ui/data_ui.admin.inc \data_ui_adjust_form_submit_create_table()
Submit handler for data_ui_adjust_form().
1 string reference to 'data_ui_adjust_form_submit_create_table'
- 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 216 - Admin UI functions.
Code
function data_ui_adjust_form_submit_create_table($form, &$form_state) {
$table = $form['#table'];
$ret = array();
db_create_table($ret, $table
->get('name'), $table
->get('table_schema'));
drupal_get_schema($table
->get('name'), TRUE);
if ($ret[0]['success']) {
drupal_set_message(t('Created table @table', array(
'@table' => $table
->get('name'),
)));
}
else {
drupal_set_message(t('Error creating table'), 'error');
}
}