summaryrefslogtreecommitdiff
path: root/modules/field/field.api.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-11-07 22:06:16 +0000
committerDries Buytaert <dries@buytaert.net>2010-11-07 22:06:16 +0000
commitcfc01f0ae9d1bbbbfaf3e348bfcf16dcd5285a39 (patch)
treec46a3e0165900f2268f4038e81588bf33861eaaa /modules/field/field.api.php
parenta956c407438e769f652b985a1d2303590bfb69cb (diff)
downloadbrdo-cfc01f0ae9d1bbbbfaf3e348bfcf16dcd5285a39.tar.gz
brdo-cfc01f0ae9d1bbbbfaf3e348bfcf16dcd5285a39.tar.bz2
- Patch #915168 by chx, yched, sun: foreign key support is missing from text and file module.
Diffstat (limited to 'modules/field/field.api.php')
-rw-r--r--modules/field/field.api.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/modules/field/field.api.php b/modules/field/field.api.php
index a7e26bb35..443b8c6d9 100644
--- a/modules/field/field.api.php
+++ b/modules/field/field.api.php
@@ -227,11 +227,14 @@ function hook_field_info_alter(&$info) {
* settings when possible. No assumptions should be made on how storage
* engines internally use the original column name to structure their
* storage.
- * - indexes: An array of Schema API indexes definitions. Only columns that
- * appear in the 'columns' array are allowed. Those indexes will be used as
- * default indexes. Callers of field_create_field() can specify additional
- * indexes, or, at their own risk, modify the default indexes specified by
- * the field-type module. Some storage engines might not support indexes.
+ * - indexes: (optional) An array of Schema API indexes definitions. Only
+ * columns that appear in the 'columns' array are allowed. Those indexes
+ * will be used as default indexes. Callers of field_create_field() can
+ * specify additional indexes, or, at their own risk, modify the default
+ * indexes specified by the field-type module. Some storage engines might
+ * not support indexes.
+ * - foreign keys: (optional) An array of Schema API foreign keys
+ * definitions.
*/
function hook_field_schema($field) {
if ($field['type'] == 'text_long') {
@@ -264,6 +267,12 @@ function hook_field_schema($field) {
'indexes' => array(
'format' => array('format'),
),
+ 'foreign keys' => array(
+ 'format' => array(
+ 'table' => 'filter_format',
+ 'columns' => array('format' => 'format'),
+ ),
+ ),
);
}