aboutsummaryrefslogtreecommitdiff
path: root/types/video_upload/video_upload.install
diff options
context:
space:
mode:
authorHeshan Wanigasooriya <heshanmw@gmail.com>2009-05-27 01:48:29 +0000
committerHeshan Wanigasooriya <heshanmw@gmail.com>2009-05-27 01:48:29 +0000
commit8cd94d3aabb438fc8efa275c1b57e44d33e2fac5 (patch)
tree5447578ec99698510b79d8c4d26d802e5294fed8 /types/video_upload/video_upload.install
parent4caf05931d7bfff98084edcf0c31f5e8c4e38aae (diff)
downloadvideo-8cd94d3aabb438fc8efa275c1b57e44d33e2fac5.tar.gz
video-8cd94d3aabb438fc8efa275c1b57e44d33e2fac5.tar.bz2
updating 6--2 dev
Diffstat (limited to 'types/video_upload/video_upload.install')
-rw-r--r--types/video_upload/video_upload.install65
1 files changed, 65 insertions, 0 deletions
diff --git a/types/video_upload/video_upload.install b/types/video_upload/video_upload.install
new file mode 100644
index 0000000..8ccb409
--- /dev/null
+++ b/types/video_upload/video_upload.install
@@ -0,0 +1,65 @@
+<?php
+//$Id$
+/**
+ * @file
+ * Provide installation functions for video_upload.module .
+ *
+ * @author Heshan Wanigasooriya <heshan at heidisoft dot com>
+ * <heshanmw at gmail dot com>
+ * @todo
+ */
+
+/**
+ * Implementation of hook_schema().
+ */
+function video_upload_schema() {
+ $schema['video_upload'] = array(
+ 'description' => t('Store video upload files'),
+ 'fields' => array(
+ 'vid' => array(
+ 'description' => t('video id : primary key'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'nid' => array(
+ 'description' => t('Node id : index of the {node}.nid'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ 'fid' => array(
+ 'description' => t('FIle id, index to the {files}.fid'),
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => TRUE,
+ 'default' => 0,
+ ),
+ ),
+ 'indexes' => array(
+ 'fid' => array('fid'),
+ 'nid' => array('nid'),
+ ),
+ 'primary key' => array('vid'),
+ );
+
+ return $schema;
+}
+
+/**
+ * Implementation of hook_install().
+ */
+function video_upload_install() {
+ // Create tables.
+ drupal_install_schema('video_upload');
+ // add video_upload_allowed_extensions variable mpeg, avi, wmv etc
+}
+
+/**
+ * Implementation of hook_uninstall().
+ */
+function video_upload_uninstall() {
+ drupal_uninstall_schema('video_upload');
+} \ No newline at end of file