summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.install
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-30 00:08:34 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-01-30 00:08:34 +0000
commitaf24809fed5debad7bdea74bf6030b8571597f02 (patch)
treec53264fe151c8e72cf4de0672f372728e6c951b8 /modules/taxonomy/taxonomy.install
parent56026aa2924bc6cfd1cb09a60d1880cbd67a567c (diff)
downloadbrdo-af24809fed5debad7bdea74bf6030b8571597f02.tar.gz
brdo-af24809fed5debad7bdea74bf6030b8571597f02.tar.bz2
#612870 by asimmonds: Fixed Weight fields should be int, not tinyint.
Diffstat (limited to 'modules/taxonomy/taxonomy.install')
-rw-r--r--modules/taxonomy/taxonomy.install30
1 files changed, 28 insertions, 2 deletions
diff --git a/modules/taxonomy/taxonomy.install b/modules/taxonomy/taxonomy.install
index 3f2a65639..a4408bb93 100644
--- a/modules/taxonomy/taxonomy.install
+++ b/modules/taxonomy/taxonomy.install
@@ -61,7 +61,6 @@ function taxonomy_schema() {
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'size' => 'tiny',
'description' => 'The weight of this term in relation to other terms.',
),
),
@@ -153,7 +152,6 @@ function taxonomy_schema() {
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'size' => 'tiny',
'description' => 'The weight of this vocabulary in relation to other vocabularies.',
),
),
@@ -433,3 +431,31 @@ function taxonomy_update_7007() {
db_add_index('taxonomy_term_data', 'name', array('name'));
}
+/**
+ * Change the weight columns to normal int.
+ */
+function taxonomy_update_7008() {
+ db_drop_index('taxonomy_term_data', 'taxonomy_tree');
+ db_change_field('taxonomy_term_data', 'weight', 'weight', array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ 'description' => 'The weight of this term in relation to other terms.',
+ ), array(
+ 'indexes' => array(
+ 'taxonomy_tree' => array('vid', 'weight', 'name'),
+ ),
+ ));
+
+ db_drop_index('taxonomy_vocabulary', 'list');
+ db_change_field('taxonomy_vocabulary', 'weight', 'weight', array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ 'description' => 'The weight of this vocabulary in relation to other vocabularies.',
+ ), array(
+ 'indexes' => array(
+ 'list' => array('weight', 'name'),
+ ),
+ ));
+}