You are here

function cas_server_update_7000 in CAS 7

Creates CAS server tickets table.

File

./cas_server.install, line 63
Installation hooks for the CAS Server module.

Code

function cas_server_update_7000() {
  $schema = array();
  $schema['cas_server_tickets'] = array(
    'description' => 'Stores CAS server tickets.',
    'fields' => array(
      'service' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'ticket' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
      ),
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'timestamp' => array(
        'type' => 'int',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'ticket',
    ),
  );
  $ret = array();
  if (!db_table_exists('cas_server_tickets')) {
    db_create_table('cas_server_tickets', $schema['cas_server_tickets']);
  }
  return $ret;
}