You are here

function uuid_update_6004 in Universally Unique IDentifier 6

Same name and namespace in other branches
  1. 7 uuid.install \uuid_update_6004()

Fix the column definitions for uuid columns in all tables to use the more efficient char spec.

File

./uuid.install, line 140
Install, update and uninstall functions for the uuid module.

Code

function uuid_update_6004() {
  $ret = array();

  // Use what's in uuid_table_schema in order to be consistent.
  $tables = uuid_schema();
  $spec = $tables['uuid_node']['fields']['uuid'];
  foreach ($tables as $tablename => $schema) {
    if (db_table_exists($tablename)) {
      db_change_field($ret, $tablename, 'uuid', 'uuid', $spec);
    }
  }
  return $ret;
}