You are here

function uuid_schema in Universally Unique IDentifier 6

Implementation of hook_schema().

4 calls to uuid_schema()
uuid_update_6002 in ./uuid.install
For each of out tables, drop the indexe on the UUID column and add a unique key on that column.
uuid_update_6004 in ./uuid.install
Fix the column definitions for uuid columns in all tables to use the more efficient char spec.
uuid_update_6005 in ./uuid.install
Modify existing uuid_node_revisions table to support revision deletion, and add in as much legacy data as possible.
uuid_views_data in ./uuid.views.inc
Implementation of hook_views_data().

File

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

Code

function uuid_schema() {
  $schema = array(
    'uuid_node' => uuid_table_schema('node', 'nid'),
    'uuid_node_revisions' => uuid_table_schema('node_revisions', 'vid'),
    'uuid_users' => uuid_table_schema('users', 'uid'),
    'uuid_vocabulary' => uuid_table_schema('vocabulary', 'vid'),
    'uuid_term_data' => uuid_table_schema('term_data', 'tid'),
    'uuid_comments' => uuid_table_schema('comments', 'cid'),
  );

  // The uuid_node_revisions table requires an additional column (node id) to
  // support revision deletion upon node delete. No index is needed on this
  // column as it will only be used during a node delete.
  $schema['uuid_node_revisions']['fields']['nid'] = array(
    'type' => 'int',
    'length' => 10,
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
    'description' => 'The revision\'s node id. Needed for delete node operations.',
  );
  return $schema;
}