You are here

function flag_update_7301 in Flag 7.3

Rename {flag_content} table to {flagging} and {flags} table to {flag}.

File

./flag.install, line 459
Flag module install/schema/update hooks.

Code

function flag_update_7301() {
  db_rename_table('flag_content', 'flagging');
  db_rename_table('flags', 'flag');

  // A second cache clear appears to be required here...
  cache_clear_all();

  // ...which in fact isn't enough, as the schema cache appears to need explicit
  // clearing to prevent the next updates failing to get the schema for the new
  // table names.
  drupal_get_schema(NULL, TRUE);
}