You are here

function skinr_schema in Skinr 7.2

Same name and namespace in other branches
  1. 6.2 skinr.install \skinr_schema()

Implements hook_schema().

File

./skinr.install, line 11
Contains install, update, and uninstall functions for Skinr.

Code

function skinr_schema() {
  $schema['skinr_skins'] = array(
    'description' => 'Stores skinr data.',
    'fields' => array(
      'sid' => array(
        'description' => 'The primary identifier for this skin configuration.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'uuid' => array(
        'description' => 'Unique Key: Universally unique identifier for this skin configuration.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => FALSE,
      ),
      'theme' => array(
        'description' => 'The theme this configuration applies to.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'module' => array(
        'description' => 'The module this configuration applies to.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'element' => array(
        'description' => 'The element this configutation applies to.',
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'skin' => array(
        'description' => 'The skin that has been applied.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'options' => array(
        'description' => 'A serialized array containing the skin options that have been applied.',
        'type' => 'text',
        'size' => 'big',
        'not null' => TRUE,
        'serialize' => TRUE,
      ),
      'status' => array(
        'description' => 'Boolean indicating whether or not this item is enabled.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
        'size' => 'tiny',
      ),
    ),
    'primary key' => array(
      'sid',
    ),
    'unique keys' => array(
      'uuid' => array(
        'uuid',
      ),
    ),
    'indexes' => array(
      'theme' => array(
        'theme',
      ),
      'module' => array(
        'theme',
        'module',
      ),
      'element' => array(
        'theme',
        'module',
        'element',
      ),
      'skin' => array(
        'skin',
      ),
    ),
  );
  return $schema;
}