USE [% pp3 %];

ALTER TABLE `[% table_prefix %]_forums` CHANGE COLUMN `forum_style` `forum_style` mediumint(8) unsigned NOT NULL default '0'; # was smallint(4) unsigned NOT NULL default '0'
ALTER TABLE `[% table_prefix %]_profile_fields` ADD COLUMN `field_show_profile` tinyint(1) unsigned NOT NULL default '0';
ALTER TABLE `[% table_prefix %]_styles` CHANGE COLUMN `style_id` `style_id` mediumint(8) unsigned NOT NULL auto_increment; # was smallint(4) unsigned NOT NULL auto_increment
ALTER TABLE `[% table_prefix %]_styles` CHANGE COLUMN `theme_id` `theme_id` mediumint(8) unsigned NOT NULL default '0'; # was smallint(4) unsigned NOT NULL default '0'
ALTER TABLE `[% table_prefix %]_styles` CHANGE COLUMN `imageset_id` `imageset_id` mediumint(8) unsigned NOT NULL default '0'; # was smallint(4) unsigned NOT NULL default '0'
ALTER TABLE `[% table_prefix %]_styles` CHANGE COLUMN `template_id` `template_id` mediumint(8) unsigned NOT NULL default '0'; # was smallint(4) unsigned NOT NULL default '0'
ALTER TABLE `[% table_prefix %]_styles_imageset` CHANGE COLUMN `imageset_id` `imageset_id` mediumint(8) unsigned NOT NULL auto_increment; # was smallint(4) unsigned NOT NULL auto_increment
ALTER TABLE `[% table_prefix %]_styles_imageset_data` CHANGE COLUMN `image_id` `image_id` mediumint(8) unsigned NOT NULL auto_increment; # was smallint(4) unsigned NOT NULL auto_increment
ALTER TABLE `[% table_prefix %]_styles_imageset_data` CHANGE COLUMN `imageset_id` `imageset_id` mediumint(8) unsigned NOT NULL default '0'; # was smallint(4) unsigned NOT NULL default '0'
ALTER TABLE `[% table_prefix %]_styles_template` CHANGE COLUMN `template_id` `template_id` mediumint(8) unsigned NOT NULL auto_increment; # was smallint(4) unsigned NOT NULL auto_increment
ALTER TABLE `[% table_prefix %]_styles_template_data` CHANGE COLUMN `template_id` `template_id` mediumint(8) unsigned NOT NULL default '0'; # was smallint(4) unsigned NOT NULL default '0'
ALTER TABLE `[% table_prefix %]_styles_theme` CHANGE COLUMN `theme_id` `theme_id` mediumint(8) unsigned NOT NULL auto_increment; # was smallint(4) unsigned NOT NULL auto_increment
ALTER TABLE `[% table_prefix %]_users` CHANGE COLUMN `user_style` `user_style` mediumint(8) unsigned NOT NULL default '0'; # was smallint(4) unsigned NOT NULL default '0'

UPDATE `[% table_prefix %]_config` SET  config_value = '3.0.4' WHERE config_name = 'version';
