summaryrefslogtreecommitdiff
path: root/sites/all/modules/media/modules/mediafield/mediafield.install
diff options
context:
space:
mode:
Diffstat (limited to 'sites/all/modules/media/modules/mediafield/mediafield.install')
-rw-r--r--sites/all/modules/media/modules/mediafield/mediafield.install43
1 files changed, 43 insertions, 0 deletions
diff --git a/sites/all/modules/media/modules/mediafield/mediafield.install b/sites/all/modules/media/modules/mediafield/mediafield.install
new file mode 100644
index 000000000..3e867b89a
--- /dev/null
+++ b/sites/all/modules/media/modules/mediafield/mediafield.install
@@ -0,0 +1,43 @@
+<?php
+
+/**
+ * @file
+ * Install and schema hooks for mediafield.
+ */
+
+/**
+ * Implements hook_field_schema().
+ */
+function mediafield_field_schema($field) {
+ return array(
+ 'columns' => array(
+ 'fid' => array(
+ 'type' => 'int',
+ 'unsigned' => TRUE,
+ 'not null' => FALSE,
+ ),
+ 'title' => array(
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => FALSE,
+ ),
+ 'data' => array(
+ 'type' => 'text',
+ 'not null' => FALSE,
+ 'size' => 'big',
+ 'serialize' => TRUE,
+ // 'description' => 'Used for storing additional information.
+ // Can be harnessed by widgets',
+ ),
+ ),
+ 'indexes' => array(
+ 'fid' => array('fid'),
+ ),
+ 'foreign keys' => array(
+ 'file_managed' => array(
+ 'table' => 'file_managed',
+ 'columns' => array('fid' => 'fid'),
+ ),
+ ),
+ );
+}