diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-09-04 15:40:52 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-09-04 15:40:52 +0000 |
commit | 9502260ecf33a4b345794eea2d0b6e6dff5dbd74 (patch) | |
tree | 26612164dfc6fef6089a6774df81e6dc3157887d /modules/field/tests | |
parent | 47326c49cbac1765a804c7c2166244148dc52401 (diff) | |
download | brdo-9502260ecf33a4b345794eea2d0b6e6dff5dbd74.tar.gz brdo-9502260ecf33a4b345794eea2d0b6e6dff5dbd74.tar.bz2 |
- Patch #902264 by Damien Tournoud: move hook_field_schema() to .install files so we can get the upgrade path to work.
Diffstat (limited to 'modules/field/tests')
-rw-r--r-- | modules/field/tests/field_test.field.inc | 36 | ||||
-rw-r--r-- | modules/field/tests/field_test.install | 36 |
2 files changed, 36 insertions, 36 deletions
diff --git a/modules/field/tests/field_test.field.inc b/modules/field/tests/field_test.field.inc index 6bb8dd87b..603eadd6a 100644 --- a/modules/field/tests/field_test.field.inc +++ b/modules/field/tests/field_test.field.inc @@ -47,42 +47,6 @@ function field_test_field_info() { } /** - * Implements hook_field_schema(). - */ -function field_test_field_schema($field) { - if ($field['type'] == 'test_field') { - return array( - 'columns' => array( - 'value' => array( - 'type' => 'int', - 'size' => 'medium', - 'not null' => FALSE, - ), - ), - 'indexes' => array( - 'value' => array('value'), - ), - ); - } - else { - return array( - 'columns' => array( - 'shape' => array( - 'type' => 'varchar', - 'length' => 32, - 'not null' => FALSE, - ), - 'color' => array( - 'type' => 'varchar', - 'length' => 32, - 'not null' => FALSE, - ), - ), - ); - } -} - -/** * Implements hook_field_update_forbid(). */ function field_test_field_update_forbid($field, $prior_field, $has_data) { diff --git a/modules/field/tests/field_test.install b/modules/field/tests/field_test.install index d16d79ee8..d4937b620 100644 --- a/modules/field/tests/field_test.install +++ b/modules/field/tests/field_test.install @@ -106,3 +106,39 @@ function field_test_schema() { return $schema; } + +/** + * Implements hook_field_schema(). + */ +function field_test_field_schema($field) { + if ($field['type'] == 'test_field') { + return array( + 'columns' => array( + 'value' => array( + 'type' => 'int', + 'size' => 'medium', + 'not null' => FALSE, + ), + ), + 'indexes' => array( + 'value' => array('value'), + ), + ); + } + else { + return array( + 'columns' => array( + 'shape' => array( + 'type' => 'varchar', + 'length' => 32, + 'not null' => FALSE, + ), + 'color' => array( + 'type' => 'varchar', + 'length' => 32, + 'not null' => FALSE, + ), + ), + ); + } +} |