You are here

function clock_schema in Clock 7.2

Implements hook_schema().

File

./clock.install, line 11
Install, update and uninstall functions for the clock module.

Code

function clock_schema() {
  $schema = array();
  $schema['clock_settings'] = array(
    'fields' => array(
      'cid' => array(
        'description' => 'The unique ID of the clock.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'time_zone_type' => array(
        'description' => 'The time zone type this clock uses.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 'site',
      ),
      'custom_time_zone' => array(
        'description' => 'The time zone this clock uses, in case of custom time zone type.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 'UTC',
      ),
      'date_type' => array(
        'description' => 'The date type this clock uses.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => 'long',
      ),
      'display' => array(
        'description' => 'The display this clock uses.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '[clock:date]',
      ),
      'weight' => array(
        'description' => 'The weight of the clock.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'cid',
    ),
  );
  return $schema;
}