You are here

function royalsliderfield_field_schema in RoyalSlider Integration 7

Implements hook_field_schema().

File

contrib/royalsliderfield/royalsliderfield.install, line 10
Install, update, and uninstall functions for the RoyalSlider Field module.

Code

function royalsliderfield_field_schema($field) {
  return array(
    'columns' => array(
      'rs_image' => array(
        'description' => 'Slide image.',
        'type' => 'int',
        'not null' => FALSE,
        'unsigned' => TRUE,
      ),
      'rs_caption' => array(
        'description' => 'Slide image caption.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'rs_video' => array(
        'description' => 'Slide video URL.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'rs_content' => array(
        'description' => 'Slide HTML content.',
        'type' => 'text',
        'size' => 'big',
        'not null' => FALSE,
      ),
      'format' => array(
        'description' => 'HTML content format.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
      ),
      'rs_link' => array(
        'description' => 'Link',
        'type' => 'varchar',
        'length' => 2048,
        'not null' => FALSE,
        'sortable' => TRUE,
      ),
    ),
    'indexes' => array(
      'rs_image' => array(
        'rs_image',
      ),
      'format' => array(
        'format',
      ),
    ),
    'foreign keys' => array(
      'rs_image' => array(
        'table' => 'file_managed',
        'columns' => array(
          'fid' => 'rs_image',
        ),
      ),
      'format' => array(
        'table' => 'filter_format',
        'columns' => array(
          'format' => 'format',
        ),
      ),
    ),
  );
}