You are here

function image_hotspots_schema in Image Hotspots 7.2

Implements hook_schema().

File

./image_hotspots.install, line 6

Code

function image_hotspots_schema() {
  $schema['image_hotspot'] = array(
    'description' => 'Stores data for image hotspots.',
    'fields' => array(
      'hid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'Primary Key: Unique hotspot ID.',
      ),
      'fid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Primary Key: File ID that contains hotspots.',
      ),
      'language' => array(
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
        'description' => "Language code, e.g. 'de' or 'en-US'.",
      ),
      'coordinates' => array(
        'type' => 'text',
        'not null' => TRUE,
        'description' => 'The hotspots data (JSON).',
      ),
    ),
    'primary key' => array(
      'hid',
      'fid',
    ),
  );
  return $schema;
}