aboutsummaryrefslogtreecommitdiff
path: root/cdn/video_s3/video_s3.install
diff options
context:
space:
mode:
authorMohamed Mujahid <muja_dd@494418.no-reply.drupal.org>2010-07-06 17:04:02 +0000
committerMohamed Mujahid <muja_dd@494418.no-reply.drupal.org>2010-07-06 17:04:02 +0000
commit0c8e7ae689eed6291bb2061c9c75e3057b230339 (patch)
treef0a8ef699214db00367763ba5f30c748d106fd69 /cdn/video_s3/video_s3.install
parent8041073c8d74e5d24e3b9f10143f3e4bd04db2de (diff)
downloadvideo-0c8e7ae689eed6291bb2061c9c75e3057b230339.tar.gz
video-0c8e7ae689eed6291bb2061c9c75e3057b230339.tar.bz2
merging changes from DRUPAL-6--4
Diffstat (limited to 'cdn/video_s3/video_s3.install')
-rw-r--r--cdn/video_s3/video_s3.install107
1 files changed, 107 insertions, 0 deletions
diff --git a/cdn/video_s3/video_s3.install b/cdn/video_s3/video_s3.install
new file mode 100644
index 0000000..b43734a
--- /dev/null
+++ b/cdn/video_s3/video_s3.install
@@ -0,0 +1,107 @@
+<?php
+// $Id$
+/**
+ * @file
+ * Provides installation functions for video_s3.module.
+ */
+
+/**
+ * Implementation of hook_schema().
+ */
+function video_s3_schema() {
+ $schema['video_s3'] = array(
+ 'description' => t('Store video s3 cdn'),
+ 'fields' => array(
+ 'vid' => array(
+ 'description' => t('Auto Increment id'),
+ 'type' => 'serial',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ ),
+ 'fid' => array(
+ 'description' => t('Original file id'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'nid' => array(
+ 'description' => t('Node id'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'bucket' => array(
+ 'type' => 'varchar',
+ 'length' => '255',
+ 'default' => '',
+ 'description' => t('The bucket the video is stored in.'),
+ ),
+ 'filename' => array(
+ 'type' => 'varchar',
+ 'length' => '255',
+ 'default' => '',
+ 'description' => t('The filename of the video.'),
+ ),
+ 'filepath' => array(
+ 'type' => 'varchar',
+ 'length' => '255',
+ 'default' => '',
+ 'description' => t('The filepath of the video.'),
+ ),
+ 'filemime' => array(
+ 'type' => 'varchar',
+ 'length' => '255',
+ 'default' => '',
+ 'description' => t('The filemime of the video.'),
+ ),
+ 'filesize' => array(
+ 'description' => t('Filesize of the video.'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'status' => array(
+ 'description' => t('Status of the cdn transfer'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'completed' => array(
+ 'description' => t('Time of successful completion to amazon.'),
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ ),
+ 'indexes' => array(
+ 'status' => array('status'),
+ 'file' => array('fid'),
+ ),
+ 'primary key' => array('vid'),
+ );
+ return $schema;
+}
+
+/**
+ * Implementation of hook_install().
+ */
+function video_s3_install() {
+ drupal_install_schema('video_s3');
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function video_s3_uninstall() {
+ drupal_uninstall_schema('video_s3');
+ // Delete our variables.
+ variable_del('amazon_s3');
+ variable_del('amazon_s3_ssl');
+ variable_del('amazon_s3_access_key');
+ variable_del('amazon_s3_secret_access_key');
+ variable_del('amazon_s3_bucket');
+} \ No newline at end of file