summaryrefslogtreecommitdiff
path: root/modules
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
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')
-rw-r--r--modules/block/block.install18
-rw-r--r--modules/contact/contact.install18
-rw-r--r--modules/filter/filter.install31
-rw-r--r--modules/poll/poll.install13
-rw-r--r--modules/profile/profile.install13
-rw-r--r--modules/taxonomy/taxonomy.install30
6 files changed, 115 insertions, 8 deletions
diff --git a/modules/block/block.install b/modules/block/block.install
index 880756fc4..497e48404 100644
--- a/modules/block/block.install
+++ b/modules/block/block.install
@@ -50,7 +50,6 @@ function block_schema() {
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'size' => 'tiny',
'description' => 'Block weight within region.',
),
'region' => array(
@@ -266,3 +265,20 @@ function block_update_7001() {
db_create_table('block_node_type', $schema['block_node_type']);
}
+
+/**
+ * Change the weight column to normal int.
+ */
+function block_update_7002() {
+ db_drop_index('block', 'list');
+ db_change_field('block', 'weight', 'weight', array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ 'description' => 'Block weight within region.',
+ ), array(
+ 'indexes' => array(
+ 'list' => array('theme', 'status', 'region', 'weight', 'module'),
+ ),
+ ));
+}
diff --git a/modules/contact/contact.install b/modules/contact/contact.install
index 1246fd677..2aeba741e 100644
--- a/modules/contact/contact.install
+++ b/modules/contact/contact.install
@@ -43,7 +43,6 @@ function contact_schema() {
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'size' => 'tiny',
'description' => "The category's weight.",
),
'selected' => array(
@@ -121,6 +120,23 @@ function contact_update_7002() {
}
/**
+ * Change the weight column to normal int.
+ */
+function contact_update_7003() {
+ db_drop_index('contact', 'list');
+ db_change_field('contact', 'weight', 'weight', array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ 'description' => "The category's weight.",
+ ), array(
+ 'indexes' => array(
+ 'list' => array('weight', 'category'),
+ ),
+ ));
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/
diff --git a/modules/filter/filter.install b/modules/filter/filter.install
index 9b3efc069..e41176767 100644
--- a/modules/filter/filter.install
+++ b/modules/filter/filter.install
@@ -37,7 +37,6 @@ function filter_schema() {
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'size' => 'tiny',
'description' => 'Weight of filter within format.',
),
'status' => array(
@@ -89,7 +88,6 @@ function filter_schema() {
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'size' => 'tiny',
'description' => 'Weight of text format to use when listing.',
)
),
@@ -360,6 +358,35 @@ function filter_update_7006() {
}
/**
+ * Change the weight columns to normal int.
+ */
+function filter_update_7007() {
+ db_drop_index('filter', 'list');
+ db_change_field('filter', 'weight', 'weight', array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ 'description' => 'Weight of filter within format.',
+ ), array(
+ 'indexes' => array(
+ 'list' => array('weight', 'module', 'name'),
+ ),
+ ));
+
+ db_drop_index('filter_format', 'weight');
+ db_change_field('filter_format', 'weight', 'weight', array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ 'description' => 'Weight of text format to use when listing.',
+ ), array(
+ 'indexes' => array(
+ 'weight' => array('weight'),
+ ),
+ ));
+}
+
+/**
* @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000.
*/
diff --git a/modules/poll/poll.install b/modules/poll/poll.install
index d953f9713..542937d97 100644
--- a/modules/poll/poll.install
+++ b/modules/poll/poll.install
@@ -72,7 +72,6 @@ function poll_schema() {
),
'weight' => array(
'type' => 'int',
- 'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
'description' => 'The sort order of this choice among all choices for the same node.',
@@ -157,3 +156,15 @@ function poll_update_7002() {
);
db_add_field('poll_vote', 'timestamp', $field);
}
+
+/**
+ * Change the weight column to normal int.
+ */
+function poll_update_7003() {
+ db_change_field('poll_choice', 'weight', 'weight', array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ 'description' => 'The sort order of this choice among all choices for the same node.',
+ ));
+}
diff --git a/modules/profile/profile.install b/modules/profile/profile.install
index 409e3fe38..35185c6c4 100644
--- a/modules/profile/profile.install
+++ b/modules/profile/profile.install
@@ -65,7 +65,6 @@ function profile_schema() {
'type' => 'int',
'not null' => TRUE,
'default' => 0,
- 'size' => 'tiny',
'description' => 'Weight of field in relation to other profile fields.',
),
'required' => array(
@@ -154,3 +153,15 @@ function profile_update_7001() {
db_rename_table('profile_fields', 'profile_field');
db_rename_table('profile_values', 'profile_value');
}
+
+/**
+ * Change the weight column to normal int.
+ */
+function profile_update_7002() {
+ db_change_field('profile', 'weight', 'weight', array(
+ 'type' => 'int',
+ 'not null' => TRUE,
+ 'default' => 0,
+ 'description' => 'Weight of field in relation to other profile fields.',
+ ));
+}
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'),
+ ),
+ ));
+}