ALTER TABLE `phpraider_announcements`
	MODIFY `announcement_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	MODIFY `profile_id` INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `phpraider_attribute`
	MODIFY `attribute_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	MODIFY `att_hover` TINYINT(1) NOT NULL DEFAULT FALSE,
	MODIFY `att_show` TINYINT(1) NOT NULL DEFAULT FALSE,
	MODIFY `att_icon` VARCHAR(45) NOT NULL DEFAULT '';

ALTER TABLE `phpraider_attribute_data`
	MODIFY `character_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `attribute_id` INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `phpraider_character`
	ADD `role_id` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `class_id`,
	MODIFY `character_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	MODIFY `profile_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `class_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `gender_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `guild_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `race_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `char_level` INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `phpraider_class`
	MODIFY `class_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	MODIFY `class_color` VARCHAR(45) NOT NULL DEFAULT '';

ALTER TABLE `phpraider_config`
	MODIFY `name` VARCHAR(255) NOT NULL DEFAULT '',
	MODIFY `value` VARCHAR(255) NOT NULL DEFAULT '';

ALTER TABLE `phpraider_config_auth`
	MODIFY `name` VARCHAR(255) NOT NULL DEFAULT '',
	MODIFY `value` VARCHAR(255) NOT NULL DEFAULT '';

ALTER TABLE `phpraider_definitions`
	MODIFY `class_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `race_id` INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `phpraider_gender`
	MODIFY `gender_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	DROP `gender_icon`;

ALTER TABLE `phpraider_groups`
	MODIFY `group_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	MODIFY `group_name` VARCHAR(45) NOT NULL DEFAULT '';

ALTER TABLE `phpraider_guild`
	MODIFY `guild_id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
	MODIFY `guild_name` VARCHAR(45) NOT NULL DEFAULT '',
	MODIFY `guild_tag` VARCHAR(45) NOT NULL DEFAULT '',
	MODIFY `guild_master` VARCHAR(45) NOT NULL DEFAULT '';

ALTER TABLE `phpraider_permissions`
	MODIFY `permission_name` VARCHAR(45) NOT NULL DEFAULT '' ,
	MODIFY `permission_value` TINYINT(1) NOT NULL DEFAULT FALSE ,
	MODIFY `group_id` INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `phpraider_profile`
	DROP `permission_id`,
	MODIFY `profile_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	MODIFY `join_date` VARCHAR(45) NOT NULL DEFAULT '',
	MODIFY `raids_attended` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `raids_cancelled` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `group_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `dst` TINYINT(1) NOT NULL DEFAULT FALSE,
	MODIFY `timezone` VARCHAR(45) NOT NULL DEFAULT '0',
	MODIFY `user_email` VARCHAR(255) NOT NULL DEFAULT '';

ALTER TABLE `phpraider_race`
	MODIFY `race_id` INT UNSIGNED NOT NULL AUTO_INCREMENT;

ALTER TABLE `phpraider_raid`
	MODIFY `raid_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	MODIFY `expired` TINYINT(1) NOT NULL DEFAULT FALSE,
	MODIFY `location` VARCHAR(45) NOT NULL DEFAULT '',
	MODIFY `raid_leader` VARCHAR(45) NOT NULL DEFAULT '',
	MODIFY `maximum` TINYINT NOT NULL DEFAULT 0,
	MODIFY `freeze_time` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `maximum_level` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `minimum_level` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `invite_time` VARCHAR(45) NOT NULL DEFAULT '',
	MODIFY `start_time` VARCHAR(45) NOT NULL DEFAULT '',
	MODIFY `icon_name` VARCHAR(45) NOT NULL DEFAULT '',
	MODIFY `use_icon` TINYINT(1) NOT NULL DEFAULT FALSE,
	MODIFY `use_name` TINYINT(1) NOT NULL DEFAULT FALSE,
	MODIFY `profile_id` INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `phpraider_raid_limits`
	MODIFY `raid_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `role_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `raid_limit` INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `phpraider_raid_templates`
	ADD column `start_time` CHAR(4) NOT NULL DEFAULT '0000' AFTER `description`,
	ADD column `invite_time` CHAR(4) NOT NULL DEFAULT '0000' AFTER `start_time`,
	MODIFY `raid_template_id` int(10) unsigned NOT NULL COMMENT '' auto_increment,
	MODIFY `icon_name` VARCHAR(45) NOT NULL DEFAULT '',
	MODIFY `location` varchar(45) NOT NULL default '',
	MODIFY `maximum` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `freeze_time` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `minimum_level` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `maximum_level` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `use_icon` TINYINT(1) NOT NULL DEFAULT FALSE,
	MODIFY `use_name` TINYINT(1) NOT NULL DEFAULT FALSE;

ALTER TABLE `phpraider_raid_templates_limits`
	MODIFY `raid_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `role_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `raid_limit` INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `phpraider_role`
	MODIFY `role_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
	MODIFY `role_name` VARCHAR(255) NOT NULL DEFAULT '',
	MODIFY `body_color` VARCHAR(255) NOT NULL DEFAULT '',
	MODIFY `header_color` VARCHAR(255) NOT NULL DEFAULT '',
	MODIFY `font_color` VARCHAR(255) NOT NULL DEFAULT '';

ALTER TABLE `phpraider_signups`
	MODIFY `raid_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `character_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `cancel` TINYINT(1) NOT NULL DEFAULT FALSE,
	MODIFY `queue` TINYINT(1) NOT NULL DEFAULT FALSE,
	MODIFY `profile_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `role_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `comments` VARCHAR(255) NOT NULL DEFAULT '',
	MODIFY `timestamp` VARCHAR(255) NOT NULL DEFAULT '',
	MODIFY `class_id` INT UNSIGNED NOT NULL DEFAULT 0;

ALTER TABLE `phpraider_subclass`
	MODIFY `character_id` INT UNSIGNED NOT NULL DEFAULT 0,
	MODIFY `class_id` INT UNSIGNED NOT NULL DEFAULT 0;