You are here

function iframe_field_schema in Iframe 7

Implements hook_field_schema().

File

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

Code

function iframe_field_schema($field) {
  if ('iframe' == $field['type']) {
    $schema = array();
    $columns = array(
      'url' => array(
        'type' => 'varchar',
        'length' => 1024,
        'not null' => FALSE,
        'sortable' => TRUE,
      ),
      'title' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => FALSE,
        'sortable' => TRUE,
      ),
      'class' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
      ),
      'width' => array(
        'type' => 'varchar',
        'length' => 4,
        'not null' => FALSE,
      ),
      'height' => array(
        'type' => 'varchar',
        'length' => 4,
        'not null' => FALSE,
      ),
      'frameborder' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'scrolling' => array(
        'type' => 'varchar',
        'length' => 4,
        'not null' => TRUE,
        'default' => 'auto',
      ),
      'transparency' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
      'tokensupport' => array(
        'type' => 'int',
        'size' => 'tiny',
        'not null' => TRUE,
        'default' => 0,
      ),
    );
    $schema['columns'] = $columns;
    return $schema;
  }
}