You are here

function _responsive_preview_get_schema in Responsive Theme Preview 7

Returns the schema defintion for the responsive_preview table.

2 calls to _responsive_preview_get_schema()
responsive_preview_schema in ./responsive_preview.install
Implements hook_schema().
responsive_preview_update_7000 in ./responsive_preview.install
Update configuration to the DB schema.

File

./responsive_preview.install, line 157
responsive_preview.install

Code

function _responsive_preview_get_schema() {
  return array(
    'description' => '',
    'fields' => array(
      'name' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
        'description' => 'Device machine name.',
      ),
      'label' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
        'description' => "Human readable device label.",
      ),
      'width' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The width of the device screen in pixels.',
      ),
      'height' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The height of the device screen in pixels.',
      ),
      'dppx' => array(
        'type' => 'float',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => 'The number of dots per pixel unit.',
      ),
      'orientation' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
        'description' => "The default orientation of the device.",
      ),
      'weight' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'description' => 'Weight, used in lists of devices.',
      ),
      'status' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
        'description' => 'Whether a device is available to end users for previewing. (0 = no, 1 = yes)',
      ),
      'langcode' => array(
        'type' => 'varchar',
        'length' => 12,
        'not null' => TRUE,
        'default' => '',
        'description' => "Language code, e.g. 'de' or 'en-US'.",
      ),
    ),
    'primary key' => array(
      'name',
    ),
    'indexes' => array(
      'list' => array(
        'weight',
        'name',
      ),
    ),
  );
}