Update hook - is it possible to generate success or failure message on operation success?
In Drupal 7, hook_update_N() doesn't need to return anything to make Drupal understand the update was successful; it needs to throw an exception in case of failure, which is what the methods of DatabaseSchema, such as DatabaseSchema::addField(), already do. (Those methods are the ones behind functions like db_add_field().)

See any of the update hooks used by Drupal core as example. (I removed the code comments just to make the code shorter.)

function user_update_7010() {
  db_change_field('users', 'signature_format', 'signature_format', array(
    'type' =&gt; 'int',
    'unsigned' =&gt; TRUE,
    'not null' =&gt; FALSE,
    'description' =&gt; 'The {filter_format}.format of the signature.',
  ));

  db_update('users')
    -&gt;fields(array('signature_format' =&gt; NULL))
    -&gt;condition('signature', '')
    -&gt;condition('signature_format', 0)
    -&gt;execute();

  $existing_formats = db_query("SELECT format FROM {filter_format}")-&gt;fetchCol();
  $default_format = variable_get('filter_default_format', 1);
  db_update('users')
    -&gt;fields(array('signature_format' =&gt; $default_format))
    -&gt;isNotNull('signature_format')
    -&gt;condition('signature_format', $existing_formats, 'NOT IN')
    -&gt;execute();
}




function node_update_7012() {
  if (variable_get('update_d6', FALSE)) {
    db_update('field_config')
      -&gt;fields(array('translatable' =&gt; 0))
      -&gt;condition('field_name', 'body')
      -&gt;execute();

    foreach (array('field_data_body', 'field_revision_body') as $table) {
      db_update($table)
        -&gt;fields(array('language' =&gt; LANGUAGE_NONE))
        -&gt;execute();
    }

    node_type_cache_reset();
  }
}


The only reason for hook_update_N() to return a string is changing the message seen in the update page.

// user_update_7002
if ($sandbox['user_from'] == $sandbox['user_count']) {
  if ($sandbox['user_not_migrated'] &gt; 0) {
    variable_set('empty_timezone_message', 1);
    drupal_set_message(format_string('Some user time zones have been emptied and need to be set to the correct values. Use the new &lt;a href="@config-url"&gt;time zone options&lt;/a&gt; to choose whether to remind users at login to set the correct time zone.', array('@config-url' =&gt; url('admin/config/regional/settings'))), 'warning');
  }
  return t('Migrated user time zones');
}


Reference


update_do_one()