You are here

function agenda_schema in Agenda 6

Same name and namespace in other branches
  1. 6.2 agenda.install \agenda_schema()
  2. 7.2 agenda.install \agenda_schema()
  3. 7 agenda.install \agenda_schema()

Implementation of hook_schema().

File

./agenda.install, line 69
Install, uninstall and scheme functions for the agenda module.

Code

function agenda_schema() {
  $schema['agenda'] = array(
    'description' => t('Hold agenda settings'),
    'fields' => array(
      'id' => array(
        'description' => t('ID'),
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'disp-width' => '11',
      ),
      'bid' => array(
        'description' => t('Block ID'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'disp-width' => '11',
      ),
      'name' => array(
        'description' => t('Name of the setting'),
        'type' => 'varchar',
        'length' => 50,
        'not null' => TRUE,
      ),
      'value' => array(
        'description' => t('Value of the setting'),
        'type' => 'varchar',
        'length' => 1024,
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'unique keys' => array(
      'kvp' => array(
        'bid',
        'name',
      ),
    ),
    'indexes' => array(
      'bid' => array(
        'bid',
      ),
    ),
  );
  return $schema;
}