You are here

function panels_mini_schema_1 in Panels 7.3

Same name and namespace in other branches
  1. 6.3 panels_mini/panels_mini.install \panels_mini_schema_1()
  2. 6.2 panels_mini/panels_mini.install \panels_mini_schema_1()

Schema version 1 for Panels in D6.

1 call to panels_mini_schema_1()
panels_mini_schema in panels_mini/panels_mini.install
Implementation of hook_schema().

File

panels_mini/panels_mini.install, line 19

Code

function panels_mini_schema_1() {
  $schema = array();
  $schema['panels_mini'] = array(
    'export' => array(
      'identifier' => 'mini',
      'load callback' => 'panels_mini_load',
      'load all callback' => 'panels_mini_load_all',
      'save callback' => 'panels_mini_save',
      'delete callback' => 'panels_mini_delete',
      'export callback' => 'panels_mini_export',
      'api' => array(
        'owner' => 'panels_mini',
        'api' => 'panels_default',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'pid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'no export' => TRUE,
        'description' => 'The primary key for uniqueness.',
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'The unique name of the mini panel.',
      ),
      'category' => array(
        'type' => 'varchar',
        'length' => '64',
        'description' => 'The category this mini panel appears in on the add content pane.',
      ),
      'did' => array(
        'type' => 'int',
        'no export' => TRUE,
        'description' => 'The display ID of the panel.',
      ),
      'admin_title' => array(
        'type' => 'varchar',
        'length' => '128',
        'description' => 'The administrative title of the mini panel.',
      ),
      'admin_description' => array(
        'type' => 'text',
        'size' => 'big',
        'description' => 'Administrative title of this mini panel.',
        'object default' => '',
      ),
      'requiredcontexts' => array(
        'type' => 'text',
        'size' => 'big',
        'serialize' => TRUE,
        'object default' => array(),
        'description' => 'An array of required contexts.',
      ),
      'contexts' => array(
        'type' => 'text',
        'size' => 'big',
        'serialize' => TRUE,
        'object default' => array(),
        'description' => 'An array of contexts embedded into the panel.',
      ),
      'relationships' => array(
        'type' => 'text',
        'size' => 'big',
        'serialize' => TRUE,
        'object default' => array(),
        'description' => 'An array of relationships embedded into the panel.',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}