View source
<?php
function resp_img_schema() {
$schema['resp_img_suffix'] = array(
'description' => 'Defines responsive images suffix\'',
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => 'The internal identifier for a responsive images suffix',
'no export' => TRUE,
),
'name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'description' => 'The name of the suffix.',
),
'label' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'description' => 'The label of the suffix.',
'default' => '',
),
'suffix' => array(
'type' => 'varchar',
'length' => 255,
'description' => 'The suffix.',
'not null' => TRUE,
'default' => '',
),
'breakpoint' => array(
'type' => 'int',
'description' => 'The breakpoint in pixels for this suffix',
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'id',
),
'unique keys' => array(
'name' => array(
'name',
),
),
'indexes' => array(
'suffix' => array(
'suffix',
),
),
'export' => array(
'key' => 'name',
'key name' => 'suffix name',
'primary key' => 'id',
'identifier' => 'resp_img_suffix',
'admin_title' => 'label',
'default hook' => 'default_resp_img_suffixs',
'api' => array(
'owner' => 'resp_img',
'api' => 'default_resp_img_suffixs',
'minimum_version' => 1,
'current_version' => 1,
),
),
);
return $schema;
}