You are here

function isotope_schema in Isotope (with Masonry and Packery) 7.2

Implements hook_schema().

File

./isotope.install, line 10
Installation functions.

Code

function isotope_schema() {
  $schema['isotope_configurations'] = array(
    'description' => 'Table storing Isotope configurations.',
    'export' => array(
      'key' => 'name',
      'key name' => 'Name',
      'primary key' => 'pid',
      // Exports will be defined as $config.
      'identifier' => 'config',
      // Function hook name.
      'default hook' => 'default_isotope_configuration',
      'api' => array(
        'owner' => 'isotope',
        // Base name for api include files.
        'api' => 'default_isotope_configurations',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'pid' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => 'Primary ID field for the table. Not used for anything except internal lookups.',
        // Do not export database-only keys.
        'no export' => TRUE,
      ),
      'name' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'Unique ID for configs. Used to identify them programmatically.',
      ),
      'admin_title' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'Human readable name.',
      ),
      'layoutMode' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'One of a list of Isotope Layout Modes.',
      ),
      'plugins' => array(
        'type' => 'text',
        'size' => 'big',
        'serialize' => TRUE,
        'description' => 'A serialized array of plugin names.',
      ),
      'transitionDuration' => array(
        'type' => 'varchar',
        'length' => '10',
        'description' => 'In CSS Time format.',
      ),
      'urlFilters' => array(
        'type' => 'int',
        'size' => 'tiny',
        'description' => 'Should filters be represented in URL?',
      ),
      'isFitWidth' => array(
        'type' => 'int',
        'size' => 'tiny',
        'description' => 'isFitWidth',
      ),
      'isHorizontal' => array(
        'type' => 'int',
        'size' => 'tiny',
        'description' => 'isHorizontal',
      ),
      'stamp' => array(
        'type' => 'varchar',
        'length' => '255',
        'description' => 'Selector of element to be stamped',
      ),
      'horizontalAlignment' => array(
        'type' => 'varchar',
        'length' => '3',
        'description' => 'Decimal between 0 and 1',
      ),
      'verticalAlignment' => array(
        'type' => 'varchar',
        'length' => '3',
        'description' => 'Decimal between 0 and 1',
      ),
      'isOriginLeft' => array(
        'type' => 'int',
        'size' => 'tiny',
        'description' => 'isOriginLeft',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
  );
  return $schema;
}