You are here

function rotor_schema in Rotor Banner 7

Same name and namespace in other branches
  1. 6.2 rotor.install \rotor_schema()
  2. 6 rotor.install \rotor_schema()

Implementation of hook_schema().

File

./rotor.install, line 69
Provides install and uninstall functions for rotor.

Code

function rotor_schema() {
  $schema['rotor_item'] = array(
    'fields' => array(
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The node id associated.',
      ),
      'fid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The {files}.fid.',
      ),
      'alt_text' => array(
        'type' => 'varchar',
        'not null' => FALSE,
        'length' => 255,
        'description' => 'The alt text for the rotor item image.',
      ),
      'url' => array(
        'type' => 'varchar',
        'not null' => FALSE,
        'length' => 255,
        'description' => 'The url of the image that will be actived.',
      ),
      'link_target' => array(
        'type' => 'varchar',
        'not null' => FALSE,
        'length' => 255,
        'description' => 'The target for the link.',
      ),
      'image_title' => array(
        'type' => 'varchar',
        'not null' => FALSE,
        'length' => 255,
        'description' => 'The image title.',
      ),
    ),
    'primary key' => array(
      'nid',
    ),
    'indexes' => array(
      'rotor_item_fid' => array(
        'fid',
      ),
    ),
    'description' => 'The file path for the rotor item image.',
  );
  return $schema;
}