Commit af24809f authored by webchick's avatar webchick
Browse files

#612870 by asimmonds: Fixed Weight fields should be int, not tinyint.

parent 56026aa2
......@@ -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'),
),
));
}
......@@ -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.
......
......@@ -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.
......
......@@ -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.',
));
}
......@@ -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.',
));
}
......@@ -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'),
),
));
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment