diff --git a/modules/block/block.install b/modules/block/block.install index 880756fc43fcdac0afbe2da3866e8bc47f240f14..497e48404d66970f4d10288d7cbe3dd98c3b4828 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 1246fd677b61e863d2b27e3fccac2386fa512663..2aeba741e7ac11552c65d172ac3e3d9e24563e73 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( @@ -120,6 +119,23 @@ function contact_update_7002() { user_role_grant_permissions(DRUPAL_AUTHENTICATED_RID, array('access user contact forms')); } +/** + * 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 9b3efc069183504c820a68d8a9dde0dd2a41bd10..e41176767854c753c9db18928e00e2a1f2bcd8b5 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.', ) ), @@ -359,6 +357,35 @@ function filter_update_7006() { db_add_index('filter', 'list', array('weight', 'module', 'name')); } +/** + * 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 d953f9713aa12d48c80a70638f161aa9c95fa126..542937d97accfbaa9eb933876581bf5c18abf693 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 409e3fe38b28d13a4b78d32b98a1a3439294163a..35185c6c47bf8587ff6c1c0edb626aef3fb92ab8 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 3f2a656398b35a8158ee9601eaa67ef2ec628800..a4408bb9342365c4737dbf7627640b988fa95e70 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'), + ), + )); +}