You are here

video.install in Video 6.3

Provide installation functions for video.module .

@author Heshan Wanigasooriya <heshan at heidisoft dot com> <heshanmw at gmail dot com> @todo

File

video.install
View source
<?php

/**
 * @file
 * Provide installation functions for video.module .
 *
 * @author Heshan Wanigasooriya <heshan at heidisoft dot com>
 *                              <heshanmw at gmail dot com>
 * @todo
 */

/**
 * Implementation of hook_schema().
 */
function video_schema() {
  $schema['video_rendering'] = array(
    'description' => t('Store video transcoding queue'),
    'fields' => array(
      'fid' => array(
        'description' => t('original file id'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'pid' => array(
        'description' => t('Process ID'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'status' => array(
        'description' => t('status of the transcoding'),
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'started' => array(
        'description' => t('Started transcodings'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'completed' => array(
        'description' => t('Transcoding completed'),
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'serialized_data' => array(
        'description' => t('Informations related to the videos'),
        'type' => 'text',
        'not null' => FALSE,
      ),
    ),
    'indexes' => array(
      'status' => array(
        'status',
      ),
    ),
    'primary key' => array(
      'fid',
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_install().
 */
function video_install() {
  drupal_install_schema('video');
}

/**
 * Implementation of hook_uninstall().
 */
function video_uninstall() {
  drupal_uninstall_schema('video');
}

/**
 * Update 6001
 * adding new filed to keep transcoder type zencoder
 * @return <type>
 */
function video_update_6000() {
  $ret = array();
  $ret[] = update_sql("ALTER TABLE {video_rendering} ADD transcoder VARCHAR( 240 ) NOT NULL");
  return $ret;
}

Functions

Namesort descending Description
video_install Implementation of hook_install().
video_schema Implementation of hook_schema().
video_uninstall Implementation of hook_uninstall().
video_update_6000 Update 6001 adding new filed to keep transcoder type zencoder