You are here

function views_isotope_schema in Brainstorm profile 7

Implements hook_schema().

File

modules/custom/views_isotope/views_isotope.install, line 11
Installation functions.

Code

function views_isotope_schema() {
  $schema['isotope_configurations'] = [
    'description' => 'Table storing Isotope configurations.',
    'export' => [
      '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' => [
        'owner' => 'views_isotope',
        // Base name for api include files.
        'api' => 'default_isotope_configurations',
        'minimum_version' => 1,
        'current_version' => 1,
      ],
    ],
    'fields' => [
      'pid' => [
        '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' => [
        'type' => 'varchar',
        'length' => '255',
        'description' => 'Unique ID for configs. Used to identify them programmatically.',
      ],
      'admin_title' => [
        'type' => 'varchar',
        'length' => '255',
        'description' => 'Human readable name.',
      ],
      'layoutMode' => [
        'type' => 'varchar',
        'length' => '255',
        'description' => 'One of a list of Isotope Layout Modes.',
      ],
      'plugins' => [
        'type' => 'text',
        'size' => 'big',
        'serialize' => TRUE,
        'description' => 'A serialized array of plugin names.',
      ],
      'transitionDuration' => [
        'type' => 'varchar',
        'length' => '10',
        'description' => 'In CSS Time format.',
      ],
      'urlFilters' => [
        'type' => 'int',
        'size' => 'tiny',
        'description' => 'Should filters be represented in URL?',
      ],
      'isFitWidth' => [
        'type' => 'int',
        'size' => 'tiny',
        'description' => 'isFitWidth',
      ],
      'isHorizontal' => [
        'type' => 'int',
        'size' => 'tiny',
        'description' => 'isHorizontal',
      ],
      'stamp' => [
        'type' => 'varchar',
        'length' => '255',
        'description' => 'Selector of element to be stamped',
      ],
      'horizontalAlignment' => [
        'type' => 'varchar',
        'length' => '3',
        'description' => 'Decimal between 0 and 1',
      ],
      'verticalAlignment' => [
        'type' => 'varchar',
        'length' => '3',
        'description' => 'Decimal between 0 and 1',
      ],
      'isOriginLeft' => [
        'type' => 'int',
        'size' => 'tiny',
        'description' => 'isOriginLeft',
      ],
    ],
    'primary key' => [
      'pid',
    ],
    'unique keys' => [
      'name' => [
        'name',
      ],
    ],
  ];
  return $schema;
}