View source
<?php
function session_api_install() {
drupal_install_schema('session_api');
}
function session_api_uninstall() {
drupal_uninstall_schema('session_api');
}
function session_api_schema() {
$schema['session_api'] = array(
'description' => t('Map Session API IDs to the {sessions} sid field.'),
'fields' => array(
'sid' => array(
'type' => 'serial',
'not null' => TRUE,
),
'session_id' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
),
),
'primary key' => array(
'sid',
),
'unique keys' => array(
'session_id' => array(
'session_id',
),
),
);
return $schema;
}
function session_api_update_6100() {
$ret = array();
$ret[] = update_sql("DELETE FROM {variable} WHERE name LIKE 'session_api_run_cron_%'");
return $ret;
}
function session_api_update_6101() {
db_change_field($ret, 'session_api', 'session_id', 'session_id', array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
));
return $ret;
}