Index: modules/block/block.install =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.install,v retrieving revision 1.8.2.2 diff -u -p -r1.8.2.2 block.install --- modules/block/block.install 6 Jan 2009 15:46:36 -0000 1.8.2.2 +++ modules/block/block.install 15 Oct 2010 21:46:19 -0000 @@ -45,7 +45,6 @@ function block_schema() { 'type' => 'int', 'not null' => TRUE, 'default' => 0, - 'size' => 'tiny', 'description' => 'Block weight within region.', ), 'region' => array( @@ -177,3 +176,21 @@ function block_schema() { return $schema; } +/** + * Change the weight column to normal int. + */ +function block_update_6000() { + $ret = array(); + + switch ($GLOBALS['db_type']) { + case 'pgsql': + db_change_column($ret, 'blocks', 'weight', 'weight', 'integer', array('not null' => TRUE, 'default' => 0)); + break; + case 'mysql': + case 'mysqli': + $ret[] = update_sql("ALTER TABLE {blocks} CHANGE weight weight int(10) NOT NULL default '0'"); + break; + } + + return $ret; +} Index: modules/contact/contact.install =================================================================== RCS file: /cvs/drupal/drupal/modules/contact/contact.install,v retrieving revision 1.10.2.1 diff -u -p -r1.10.2.1 contact.install --- modules/contact/contact.install 6 Jan 2009 15:46:36 -0000 1.10.2.1 +++ modules/contact/contact.install 15 Oct 2010 21:46:19 -0000 @@ -57,7 +57,6 @@ function contact_schema() { 'type' => 'int', 'not null' => TRUE, 'default' => 0, - 'size' => 'tiny', 'description' => "The category's weight.", ), 'selected' => array( @@ -79,3 +78,22 @@ function contact_schema() { return $schema; } + +/** + * Change the weight column to normal int. + */ +function contact_update_6000() { + $ret = array(); + + switch ($GLOBALS['db_type']) { + case 'pgsql': + db_change_column($ret, 'contact', 'weight', 'weight', 'integer', array('not null' => TRUE, 'default' => 0)); + break; + case 'mysql': + case 'mysqli': + $ret[] = update_sql("ALTER TABLE {contact} CHANGE weight weight int(10) NOT NULL default '0'"); + break; + } + + return $ret; +} Index: modules/filter/filter.install =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.install,v retrieving revision 1.5.2.1 diff -u -p -r1.5.2.1 filter.install --- modules/filter/filter.install 6 Jan 2009 15:46:36 -0000 1.5.2.1 +++ modules/filter/filter.install 15 Oct 2010 21:46:19 -0000 @@ -37,7 +37,6 @@ function filter_schema() { 'type' => 'int', 'not null' => TRUE, 'default' => 0, - 'size' => 'tiny', 'description' => 'Weight of filter within format.', ) ), @@ -89,3 +88,21 @@ function filter_schema() { return $schema; } +/** + * Change the weight column to normal int. + */ +function filter_update_6000() { + $ret = array(); + + switch ($GLOBALS['db_type']) { + case 'pgsql': + db_change_column($ret, 'filters', 'weight', 'weight', 'integer', array('not null' => TRUE, 'default' => 0)); + break; + case 'mysql': + case 'mysqli': + $ret[] = update_sql("ALTER TABLE {filters} CHANGE weight weight int(10) NOT NULL default '0'"); + break; + } + + return $ret; +} Index: modules/profile/profile.install =================================================================== RCS file: /cvs/drupal/drupal/modules/profile/profile.install,v retrieving revision 1.12.2.1 diff -u -p -r1.12.2.1 profile.install --- modules/profile/profile.install 6 Jan 2009 15:46:37 -0000 1.12.2.1 +++ modules/profile/profile.install 15 Oct 2010 21:46:19 -0000 @@ -71,7 +71,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( @@ -145,3 +144,21 @@ function profile_schema() { return $schema; } +/** + * Change the weight column to normal int. + */ +function profile_update_6000() { + $ret = array(); + + switch ($GLOBALS['db_type']) { + case 'pgsql': + db_change_column($ret, 'profile_fields', 'weight', 'weight', 'integer', array('not null' => TRUE, 'default' => 0)); + break; + case 'mysql': + case 'mysqli': + $ret[] = update_sql("ALTER TABLE {profile_fields} CHANGE weight weight int(10) NOT NULL default '0'"); + break; + } + + return $ret; +} Index: modules/taxonomy/taxonomy.install =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.install,v retrieving revision 1.7.2.1 diff -u -p -r1.7.2.1 taxonomy.install --- modules/taxonomy/taxonomy.install 6 Jan 2009 15:46:38 -0000 1.7.2.1 +++ modules/taxonomy/taxonomy.install 15 Oct 2010 21:46:19 -0000 @@ -38,7 +38,6 @@ function taxonomy_schema() { 'type' => 'int', 'not null' => TRUE, 'default' => 0, - 'size' => 'tiny', 'description' => 'The weight of this term in relation to other terms.', ), ), @@ -247,7 +246,6 @@ function taxonomy_schema() { 'type' => 'int', 'not null' => TRUE, 'default' => 0, - 'size' => 'tiny', 'description' => 'The weight of the vocabulary in relation to other vocabularies.', ), ), @@ -284,3 +282,23 @@ function taxonomy_schema() { return $schema; } +/** + * Change the weight columns to normal int. + */ +function taxonomy_update_6000() { + $ret = array(); + + switch ($GLOBALS['db_type']) { + case 'pgsql': + db_change_column($ret, 'term_data', 'weight', 'weight', 'integer', array('not null' => TRUE, 'default' => 0)); + db_change_column($ret, 'vocabulary', 'weight', 'weight', 'integer', array('not null' => TRUE, 'default' => 0)); + break; + case 'mysql': + case 'mysqli': + $ret[] = update_sql("ALTER TABLE {term_data} CHANGE weight weight int(10) NOT NULL default '0'"); + $ret[] = update_sql("ALTER TABLE {vocabulary} CHANGE weight weight int(10) NOT NULL default '0'"); + break; + } + + return $ret; +}