function uuid_table_schema in Universally Unique IDentifier 5
Same name and namespace in other branches
- 6 uuid.install \uuid_table_schema()
Return schema for a uuid table.
Parameters
$table: Table name.
$key: Name of key field, e.g. nid for nodes.
Return value
Array with table structure definition (schema).
2 calls to uuid_table_schema()
- uuid_install in ./
uuid.install - Implementation of hook_install().
- uuid_update_2 in ./
uuid.install
File
- ./
uuid.install, line 61
Code
function uuid_table_schema($table, $key = 'key') {
return "CREATE TABLE {uuid_" . $table . "} (\n " . $key . " int(10) unsigned NOT NULL default '0',\n uuid char(36) NOT NULL default '',\n PRIMARY KEY (" . $key . "),\n KEY {uuid_" . $table . "}_uuid_idx(uuid)\n ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;";
}