mediamosa_statistics_stream_request_schema

Versions
mediamosa-21
mediamosa_statistics_stream_request_schema()

Implements hook_schema().

Code

sites/all/modules/mediamosa/core/statistics/stream_request/mediamosa_statistics_stream_request.install.inc, line 61

<?php
function mediamosa_statistics_stream_request_schema() {

  $a_schema[mediamosa_statistics_stream_request_db::TABLE_NAME] = array(
  'description' => t('The statistics stream request table.'),
    'fields' => array(
      mediamosa_statistics_stream_request_db::ID => array(
        'type' => 'serial',
        'not null' => TRUE,
        'unsigned' => TRUE,
        'description' => t('Primary Key: Unique ID.'),
      ),
      mediamosa_statistics_stream_request_db::APP_ID => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'description' => t('The application ID.'),
      ),
      mediamosa_statistics_stream_request_db::ASSET_ID => array(
        'type' => 'varchar',
        'length' => mediamosa_db::HASH_ID_LENGTH,
        'not null' => TRUE,
        'description' => t('The parent asset ID.'),
      ),
      mediamosa_statistics_stream_request_db::MEDIAFILE_ID => array(
        'type' => 'varchar',
        'length' => mediamosa_db::HASH_ID_LENGTH,
        'not null' => TRUE,
        'description' => t('The parent mediafile ID.'),
      ),
      mediamosa_statistics_stream_request_db::OWNER_ID => array(
        'type' => 'varchar',
        'length' => mediamosa_asset_db::OWNER_ID_LENGTH,
        'not null' => FALSE,
        'description' => t('The owner ID.'),
      ),
      mediamosa_statistics_stream_request_db::GROUP_ID => array(
        'type' => 'varchar',
        'length' => mediamosa_asset_db::GROUP_ID_LENGTH,
        'not null' => FALSE,
        'description' => t('The group ID.'),
      ),
      mediamosa_statistics_stream_request_db::FILESIZE => array(
        'type' => 'int',
        'size' => 'big',
        'not null' => FALSE,
        'unsigned' => FALSE,
        'description' => t('The file size of the request.'),
      ),
      mediamosa_statistics_stream_request_db::CONTAINER_TYPE => array(
        'type' => 'varchar',
        'length' => mediamosa_statistics_stream_request_db::CONTAINER_TYPE_LENGTH,
        'not null' => FALSE,
        'description' => t('The container type of the request.'),
      ),
      mediamosa_statistics_stream_request_db::PLAY_TYPE => array(
        'type' => 'varchar',
        'length' => mediamosa_statistics_stream_request_db::PLAY_TYPE_LENGTH,
        'not null' => TRUE,
        'description' => t('The container type of the request.'),
      ),
      mediamosa_statistics_stream_request_db::PLAYED => array(
        'type' => 'datetime',
        'not null' => TRUE,
        'description' => t('The time and date of the request.'),
      ),
    ),
    'primary key' => array(mediamosa_statistics_stream_request_db::ID),
    'indexes' => array(
      'idx_mediafileid'  => array(mediamosa_statistics_stream_request_db::MEDIAFILE_ID),
      'idx_assetid'  => array(mediamosa_statistics_stream_request_db::ASSET_ID),
    ),
  );

  return $a_schema;
}
?>