You are here

function media_gallery_schema in Media Gallery 7.2

Same name and namespace in other branches
  1. 7 media_gallery.install \media_gallery_schema()

Implements hook_schema().

File

./media_gallery.install, line 148
Install file for media_gallery. Includes field and instance definitions.

Code

function media_gallery_schema() {
  $schema['media_gallery_weight'] = array(
    'description' => 'The weight of media galleries within a given collection.',
    'fields' => array(
      'tid' => array(
        'description' => 'The taxonomy term id corresponding to a media gallery collection.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'nid' => array(
        'description' => 'The node id of the media gallery.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'weight' => array(
        'description' => 'The weight of the media gallery within the collection.',
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'tid',
      'nid',
    ),
  );
  return $schema;
}