mediamosa_webservice_app_schema

Versions
mediamosa-21
mediamosa_webservice_app_schema()

Implements hook_schema().

Return value

array

Code

sites/all/modules/mediamosa/core/webservice/app/mediamosa_webservice_app.install.inc, line 54

<?php
function mediamosa_webservice_app_schema() {
  $schema[mediamosa_webservice_app_db::TABLE_NAME] = array(
    'description' => t('The webservice are modules of mediamosa, which can be enabled/disabled per application.'),
    'fields' => array(
      mediamosa_webservice_app_db::ID => array(
        'description' => t('The webservice app ID.'),
        'type' => 'serial',
        'not null' => TRUE,
      ),
      mediamosa_webservice_app_db::WEBSERVICE_HANDLE => array(
        'description' => t('The handle of the webservice.'),
        'type' => 'varchar',
        'length' => mediamosa_webservice_app_db::WEBSERVICE_HANDLE_LENGTH,
        'not null' => TRUE,
      ),
      mediamosa_webservice_app_db::APP_ID => array(
        'description' => t('The APP ID.'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      mediamosa_webservice_app_db::STATUS => array(
        'description' => t('The webservice application switch.'),
        'type' => "enum('" . implode("','", array(mediamosa_webservice_app_db::STATUS_FALSE, mediamosa_webservice_app_db::STATUS_TRUE)) . "')",
        'not null' => TRUE,
        'mysql_type' => "enum('" . implode("','", array(mediamosa_webservice_app_db::STATUS_FALSE, mediamosa_webservice_app_db::STATUS_TRUE)) . "')",
        'default' => mediamosa_webservice_app_db::STATUS_TRUE,
      ),
    ),
    'primary key' => array(mediamosa_webservice_app_db::ID, mediamosa_webservice_app_db::WEBSERVICE_HANDLE),
  );

  return $schema;
}
?>