You are here

function mediafront_schema in MediaFront 7.2

Same name and namespace in other branches
  1. 6.2 mediafront.install \mediafront_schema()
  2. 6 mediafront.install \mediafront_schema()
  3. 7 mediafront.install \mediafront_schema()

Implements hook_schema().

File

./mediafront.install, line 5

Code

function mediafront_schema() {
  $schema['mediafront_preset'] = array(
    'description' => 'The preset table for MediaFront.',
    'fields' => array(
      'pid' => array(
        'description' => 'The primary identifier for a MediaFront preset.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'name' => array(
        'description' => 'The name of this preset.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'description' => array(
        'description' => 'A brief description of this preset.',
        'type' => 'text',
        'size' => 'medium',
        'translatable' => TRUE,
      ),
      'player' => array(
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'connect' => array(
        'type' => 'text',
        'size' => 'medium',
        'serialize' => TRUE,
        'description' => 'Serialized player connection settings.',
      ),
      'settings' => array(
        'type' => 'text',
        'size' => 'medium',
        'serialize' => TRUE,
        'description' => 'Serialized player settings that do not warrant a dedicated column.',
      ),
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
    'primary key' => array(
      'pid',
    ),
  );
  return $schema;
}