function _oauth_common_consumer_schema in OAuth 1.0 6.3
Same name and namespace in other branches
- 7.4 oauth_common.install \_oauth_common_consumer_schema()
- 7.3 oauth_common.install \_oauth_common_consumer_schema()
Contains the consumer schema - used by oauth_common_schema() as well as latest related update function
2 calls to _oauth_common_consumer_schema()
- oauth_common_schema in ./
oauth_common.install - Implementation of hook_schema().
- _oauth_common_update_6300 in updates/
update.6300.inc - This update massively refactors the database.
File
- ./
oauth_common.install, line 133 - Installation and schema related functions for the OAuth module
Code
function _oauth_common_consumer_schema() {
return array(
'description' => 'Keys and secrets for OAuth consumers, both those provided by this site and other sites.',
'fields' => array(
'csid' => array(
'type' => 'serial',
'description' => 'Primary ID field for the table. Not used for anything except internal lookups.',
'not null' => TRUE,
),
'key_hash' => array(
'description' => 'SHA1-hash of consumer_key.',
'type' => 'char',
'length' => 40,
'not null' => TRUE,
),
// Key is a reserved word in MySQL so lets avoid that
'consumer_key' => array(
'description' => 'Consumer key.',
'type' => 'text',
'not null' => TRUE,
),
'secret' => array(
'description' => 'Consumer secret.',
'type' => 'text',
'not null' => TRUE,
),
'configuration' => array(
'description' => 'Consumer configuration',
'type' => 'text',
'serialized' => TRUE,
'size' => 'big',
'not null' => TRUE,
'object default' => array(),
),
),
'primary key' => array(
'csid',
),
'indexes' => array(
'key_hash' => array(
'key_hash',
),
),
);
}