Posted 4 сентября, 20222 yr comment_185618 Ребят возник вопрос с бд , Установил чистый форум и выходит такая хрень Спойлер Возникли некоторые проблемы с базой данных. Обычны их можно исправить в автоматическом режиме, однако, если ваше сообщество велико, вы можете запустить необходимые запросы вручную. Запросы для ручного выполнения: UPDATE `core_modules` SET `sys_module_id`='' WHERE `sys_module_id` IS NULL; UPDATE `core_modules` SET `sys_module_visible`=1 WHERE `sys_module_visible` IS NULL; UPDATE `core_modules` SET `sys_module_position`=0 WHERE `sys_module_position` IS NULL; ALTER TABLE `core_modules` CHANGE COLUMN `sys_module_id` `sys_module_id` MEDIUMINT (4) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `sys_module_protected` `sys_module_protected` TINYINT (1) UNSIGNED NULL DEFAULT 0 , CHANGE COLUMN `sys_module_visible` `sys_module_visible` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `sys_module_position` `sys_module_position` INT (5) NOT NULL DEFAULT 0 ; UPDATE `core_applications` SET `app_id`='' WHERE `app_id` IS NULL; UPDATE `core_applications` SET `app_long_version`=10000 WHERE `app_long_version` IS NULL; UPDATE `core_applications` SET `app_added`=0 WHERE `app_added` IS NULL; UPDATE `core_applications` SET `app_position`=0 WHERE `app_position` IS NULL; UPDATE `core_applications` SET `app_protected`=0 WHERE `app_protected` IS NULL; UPDATE `core_applications` SET `app_enabled`=0 WHERE `app_enabled` IS NULL; UPDATE `core_applications` SET `app_update_last_check`=0 WHERE `app_update_last_check` IS NULL; ALTER TABLE `core_applications` CHANGE COLUMN `app_id` `app_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `app_long_version` `app_long_version` INT (10) NOT NULL DEFAULT 10000 , CHANGE COLUMN `app_added` `app_added` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `app_position` `app_position` INT (2) NOT NULL DEFAULT 0 , CHANGE COLUMN `app_protected` `app_protected` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `app_enabled` `app_enabled` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `app_update_last_check` `app_update_last_check` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `app_default` `app_default` TINYINT (1) UNSIGNED NULL DEFAULT 0 ; UPDATE `core_dev` SET `last_sync`=0 WHERE `last_sync` IS NULL; ALTER TABLE `core_dev` CHANGE COLUMN `last_sync` `last_sync` INT (11) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Timestamp of last sync'; UPDATE `core_members` SET `member_id`='' WHERE `member_id` IS NULL; UPDATE `core_members` SET `member_group_id`=0 WHERE `member_group_id` IS NULL; UPDATE `core_members` SET `joined`=0 WHERE `joined` IS NULL; UPDATE `core_members` SET `warn_lastwarn`=0 WHERE `warn_lastwarn` IS NULL; UPDATE `core_members` SET `restrict_post`=0 WHERE `restrict_post` IS NULL; UPDATE `core_members` SET `msg_count_new`=0 WHERE `msg_count_new` IS NULL; UPDATE `core_members` SET `msg_count_total`=0 WHERE `msg_count_total` IS NULL; UPDATE `core_members` SET `msg_count_reset`=0 WHERE `msg_count_reset` IS NULL; UPDATE `core_members` SET `msg_show_notification`=0 WHERE `msg_show_notification` IS NULL; UPDATE `core_members` SET `mod_posts`=0 WHERE `mod_posts` IS NULL; UPDATE `core_members` SET `failed_login_count`=0 WHERE `failed_login_count` IS NULL; UPDATE `core_members` SET `members_profile_views`=0 WHERE `members_profile_views` IS NULL; UPDATE `core_members` SET `members_bitoptions`=0 WHERE `members_bitoptions` IS NULL; UPDATE `core_members` SET `notification_cnt`=0 WHERE `notification_cnt` IS NULL; UPDATE `core_members` SET `profilesync_lastsync`=0 WHERE `profilesync_lastsync` IS NULL; UPDATE `core_members` SET `members_bitoptions2`=0 WHERE `members_bitoptions2` IS NULL; UPDATE `core_members` SET `members_disable_pm`=0 WHERE `members_disable_pm` IS NULL; UPDATE `core_members` SET `pp_cover_offset`=0 WHERE `pp_cover_offset` IS NULL; UPDATE `core_members` SET `member_posts`=0 WHERE `member_posts` IS NULL; ALTER TABLE `core_members` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT , DROP INDEX `member_groups`, CHANGE COLUMN `member_group_id` `member_group_id` SMALLINT (3) NOT NULL DEFAULT 0 , ADD KEY `member_groups` (`member_group_id`,`mgroup_others`(188)), CHANGE COLUMN `joined` `joined` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `skin` `skin` SMALLINT (5) NULL , CHANGE COLUMN `warn_level` `warn_level` INT (10) NULL , CHANGE COLUMN `warn_lastwarn` `warn_lastwarn` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `language` `language` MEDIUMINT (4) NULL , CHANGE COLUMN `restrict_post` `restrict_post` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `bday_day` `bday_day` INT (2) NULL , CHANGE COLUMN `bday_month` `bday_month` INT (2) NULL , CHANGE COLUMN `bday_year` `bday_year` INT (4) NULL , CHANGE COLUMN `msg_count_new` `msg_count_new` INT (2) NOT NULL DEFAULT 0 , CHANGE COLUMN `msg_count_total` `msg_count_total` INT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `msg_count_reset` `msg_count_reset` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `msg_show_notification` `msg_show_notification` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `last_visit` `last_visit` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `last_activity` `last_activity` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `mod_posts` `mod_posts` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `temp_ban` `temp_ban` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `failed_login_count` `failed_login_count` SMALLINT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `members_profile_views` `members_profile_views` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `members_bitoptions` `members_bitoptions` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `notification_cnt` `notification_cnt` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `pp_main_width` `pp_main_width` INT (5) NULL , CHANGE COLUMN `pp_main_height` `pp_main_height` INT (5) NULL , CHANGE COLUMN `pp_thumb_width` `pp_thumb_width` INT (5) NULL , CHANGE COLUMN `pp_thumb_height` `pp_thumb_height` INT (5) NULL , CHANGE COLUMN `pp_setting_count_comments` `pp_setting_count_comments` INT (2) NULL , CHANGE COLUMN `pp_reputation_points` `pp_reputation_points` INT (10) NULL , DROP INDEX `profilesync`, CHANGE COLUMN `profilesync_lastsync` `profilesync_lastsync` INT (10) NOT NULL DEFAULT 0 COMMENT 'Indicates the last time any profile sync service was ran', ADD KEY `profilesync` (`profilesync_lastsync`,`profilesync`(181)), CHANGE COLUMN `members_bitoptions2` `members_bitoptions2` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `members_disable_pm` `members_disable_pm` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0 - not disabled, 1 - disabled, member can re-enable, 2 - disabled', CHANGE COLUMN `marked_site_read` `marked_site_read` INT (10) UNSIGNED NULL DEFAULT 0 , CHANGE COLUMN `pp_cover_offset` `pp_cover_offset` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `acp_skin` `acp_skin` SMALLINT (6) NULL , CHANGE COLUMN `acp_language` `acp_language` MEDIUMINT (9) NULL , CHANGE COLUMN `member_posts` `member_posts` MEDIUMINT (7) NOT NULL DEFAULT 0 , CHANGE COLUMN `member_last_post` `member_last_post` INT (10) NULL , CHANGE COLUMN `photo_last_update` `photo_last_update` INT (10) NULL , CHANGE COLUMN `failed_mfa_attempts` `failed_mfa_attempts` SMALLINT (3) UNSIGNED NULL DEFAULT 0 COMMENT 'Number of times tried and failed MFA'; UPDATE `core_sys_cp_sessions` SET `session_member_id`=0 WHERE `session_member_id` IS NULL; UPDATE `core_sys_cp_sessions` SET `session_log_in_time`=0 WHERE `session_log_in_time` IS NULL; UPDATE `core_sys_cp_sessions` SET `session_running_time`=0 WHERE `session_running_time` IS NULL; ALTER TABLE `core_sys_cp_sessions` CHANGE COLUMN `session_member_id` `session_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `session_log_in_time` `session_log_in_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `session_running_time` `session_running_time` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_groups` SET `g_id`='' WHERE `g_id` IS NULL; UPDATE `core_groups` SET `g_attach_per_post`=0 WHERE `g_attach_per_post` IS NULL; UPDATE `core_groups` SET `g_dname_changes`=0 WHERE `g_dname_changes` IS NULL; UPDATE `core_groups` SET `g_dname_date`=0 WHERE `g_dname_date` IS NULL; UPDATE `core_groups` SET `g_mod_preview`=0 WHERE `g_mod_preview` IS NULL; UPDATE `core_groups` SET `g_rep_max_positive`=0 WHERE `g_rep_max_positive` IS NULL; UPDATE `core_groups` SET `g_rep_max_negative`=0 WHERE `g_rep_max_negative` IS NULL; UPDATE `core_groups` SET `g_bitoptions`=0 WHERE `g_bitoptions` IS NULL; UPDATE `core_groups` SET `g_pm_perday`=-1 WHERE `g_pm_perday` IS NULL; UPDATE `core_groups` SET `g_mod_post_unit`=0 WHERE `g_mod_post_unit` IS NULL; UPDATE `core_groups` SET `g_ppd_limit`=0 WHERE `g_ppd_limit` IS NULL; UPDATE `core_groups` SET `g_ppd_unit`=0 WHERE `g_ppd_unit` IS NULL; UPDATE `core_groups` SET `g_displayname_unit`=0 WHERE `g_displayname_unit` IS NULL; UPDATE `core_groups` SET `g_sig_unit`=0 WHERE `g_sig_unit` IS NULL; UPDATE `core_groups` SET `g_pm_flood_mins`=-1 WHERE `g_pm_flood_mins` IS NULL; UPDATE `core_groups` SET `g_max_bgimg_upload`=1024 WHERE `g_max_bgimg_upload` IS NULL; UPDATE `core_groups` SET `g_topic_rate_setting`=0 WHERE `g_topic_rate_setting` IS NULL; UPDATE `core_groups` SET `g_bitoptions2`=0 WHERE `g_bitoptions2` IS NULL; UPDATE `core_groups` SET `g_upload_animated_photos`=1 WHERE `g_upload_animated_photos` IS NULL; ALTER TABLE `core_groups` CHANGE COLUMN `g_id` `g_id` INT (3) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `g_attach_max` `g_attach_max` BIGINT (20) NULL , CHANGE COLUMN `g_max_messages` `g_max_messages` INT (5) NULL DEFAULT -1 , CHANGE COLUMN `g_max_mass_pm` `g_max_mass_pm` INT (5) NULL DEFAULT -1 , CHANGE COLUMN `g_search_flood` `g_search_flood` MEDIUMINT (6) NULL DEFAULT 2 , CHANGE COLUMN `g_edit_cutoff` `g_edit_cutoff` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `g_attach_per_post` `g_attach_per_post` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `g_dname_changes` `g_dname_changes` INT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `g_dname_date` `g_dname_date` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `g_mod_preview` `g_mod_preview` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `g_rep_max_positive` `g_rep_max_positive` MEDIUMINT (8) NOT NULL DEFAULT 0 , CHANGE COLUMN `g_rep_max_negative` `g_rep_max_negative` MEDIUMINT (8) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `g_bitoptions` `g_bitoptions` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `g_pm_perday` `g_pm_perday` SMALLINT (6) NOT NULL DEFAULT -1 , CHANGE COLUMN `g_mod_post_unit` `g_mod_post_unit` INT (5) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `g_ppd_limit` `g_ppd_limit` INT (5) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `g_ppd_unit` `g_ppd_unit` INT (5) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `g_displayname_unit` `g_displayname_unit` INT (5) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `g_sig_unit` `g_sig_unit` INT (5) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `g_pm_flood_mins` `g_pm_flood_mins` INT (5) NOT NULL DEFAULT -1 , CHANGE COLUMN `g_max_bgimg_upload` `g_max_bgimg_upload` INT (10) NOT NULL DEFAULT 1024 , CHANGE COLUMN `g_post_polls` `g_post_polls` TINYINT (1) UNSIGNED NULL DEFAULT 1 COMMENT 'Can create polls?', CHANGE COLUMN `g_vote_polls` `g_vote_polls` TINYINT (1) UNSIGNED NULL DEFAULT 1 COMMENT 'Can vote in polls?', CHANGE COLUMN `g_topic_rate_setting` `g_topic_rate_setting` SMALLINT (2) NOT NULL DEFAULT 0 , CHANGE COLUMN `g_bitoptions2` `g_bitoptions2` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `g_upload_animated_photos` `g_upload_animated_photos` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `g_club_limit` `g_club_limit` INT (10) UNSIGNED NULL COMMENT 'Maximum number of clubs, NULL for unlimited'; UPDATE `core_validating` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `core_validating` SET `entry_date`=0 WHERE `entry_date` IS NULL; UPDATE `core_validating` SET `spam_flag`=0 WHERE `spam_flag` IS NULL; UPDATE `core_validating` SET `forgot_security`=0 WHERE `forgot_security` IS NULL; UPDATE `core_validating` SET `do_not_delete`=0 WHERE `do_not_delete` IS NULL; UPDATE `core_validating` SET `reg_cancelled`=0 WHERE `reg_cancelled` IS NULL; ALTER TABLE `core_validating` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `entry_date` `entry_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `spam_flag` `spam_flag` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `email_sent` `email_sent` INT (10) NULL COMMENT 'Timestamp of when the confirmation email was last sent', CHANGE COLUMN `forgot_security` `forgot_security` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `do_not_delete` `do_not_delete` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'A flag to specify that the account should not be deleted in the normal cleanup of unvalidated accounts. Used for accounts created in Commerce checkout.', CHANGE COLUMN `reg_cancelled` `reg_cancelled` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Flag to see if the user likes soup. Kidding, timestamp of when they have cancelled their reg.'; UPDATE `core_sys_lang` SET `lang_id`='' WHERE `lang_id` IS NULL; UPDATE `core_sys_lang` SET `lang_default`=0 WHERE `lang_default` IS NULL; UPDATE `core_sys_lang` SET `lang_isrtl`=0 WHERE `lang_isrtl` IS NULL; ALTER TABLE `core_sys_lang` CHANGE COLUMN `lang_id` `lang_id` MEDIUMINT (4) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `lang_default` `lang_default` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `lang_isrtl` `lang_isrtl` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `lang_order` `lang_order` MEDIUMINT (5) UNSIGNED NULL ; UPDATE `core_sys_lang_words` SET `word_id`='' WHERE `word_id` IS NULL; UPDATE `core_sys_lang_words` SET `lang_id`=0 WHERE `lang_id` IS NULL; UPDATE `core_sys_lang_words` SET `word_js`=0 WHERE `word_js` IS NULL; UPDATE `core_sys_lang_words` SET `word_export`=1 WHERE `word_export` IS NULL; ALTER TABLE `core_sys_lang_words` CHANGE COLUMN `word_id` `word_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'UID', CHANGE COLUMN `lang_id` `lang_id` MEDIUMINT (4) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The ID number for the language', CHANGE COLUMN `word_plugin` `word_plugin` BIGINT (20) NULL COMMENT 'The plugin ID, if word belongs to a plugin', CHANGE COLUMN `word_theme` `word_theme` INT (10) NULL COMMENT 'The theme ID, if the language string belongs to a theme.', CHANGE COLUMN `word_js` `word_js` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Binary if this word should be available to JavaScript', CHANGE COLUMN `word_export` `word_export` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Binary if this word should be exported (i.e. is not a forum/etc name)'; UPDATE `core_reputation_levels` SET `level_id`='' WHERE `level_id` IS NULL; UPDATE `core_reputation_levels` SET `level_points`=0 WHERE `level_points` IS NULL; ALTER TABLE `core_reputation_levels` CHANGE COLUMN `level_id` `level_id` MEDIUMINT (8) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `level_points` `level_points` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_sys_conf_settings` SET `conf_id`='' WHERE `conf_id` IS NULL; ALTER TABLE `core_sys_conf_settings` CHANGE COLUMN `conf_id` `conf_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `conf_plugin` `conf_plugin` BIGINT (20) UNSIGNED NULL ; UPDATE `core_admin_permission_rows` SET `row_id`=0 WHERE `row_id` IS NULL; UPDATE `core_admin_permission_rows` SET `row_updated`=0 WHERE `row_updated` IS NULL; ALTER TABLE `core_admin_permission_rows` CHANGE COLUMN `row_id` `row_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `row_updated` `row_updated` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_member_ranks` SET `id`='' WHERE `id` IS NULL; ALTER TABLE `core_member_ranks` CHANGE COLUMN `id` `id` SMALLINT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `posts` `posts` INT (10) NULL ; UPDATE `core_banfilters` SET `ban_id`='' WHERE `ban_id` IS NULL; UPDATE `core_banfilters` SET `ban_date`=0 WHERE `ban_date` IS NULL; ALTER TABLE `core_banfilters` CHANGE COLUMN `ban_id` `ban_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `ban_date` `ban_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_pfields_content` SET `member_id`=0 WHERE `member_id` IS NULL; ALTER TABLE `core_pfields_content` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_pfields_groups` SET `pf_group_id`='' WHERE `pf_group_id` IS NULL; UPDATE `core_pfields_groups` SET `pf_group_order`=0 WHERE `pf_group_order` IS NULL; ALTER TABLE `core_pfields_groups` CHANGE COLUMN `pf_group_id` `pf_group_id` MEDIUMINT (4) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `pf_group_order` `pf_group_order` MEDIUMINT (4) NOT NULL DEFAULT 0 ; UPDATE `core_pfields_data` SET `pf_id`='' WHERE `pf_id` IS NULL; UPDATE `core_pfields_data` SET `pf_max_input`=0 WHERE `pf_max_input` IS NULL; UPDATE `core_pfields_data` SET `pf_position`=0 WHERE `pf_position` IS NULL; UPDATE `core_pfields_data` SET `pf_group_id`=0 WHERE `pf_group_id` IS NULL; UPDATE `core_pfields_data` SET `pf_allow_attachments`=1 WHERE `pf_allow_attachments` IS NULL; ALTER TABLE `core_pfields_data` CHANGE COLUMN `pf_id` `pf_id` SMALLINT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `pf_max_input` `pf_max_input` SMALLINT (6) NOT NULL DEFAULT 0 , CHANGE COLUMN `pf_position` `pf_position` SMALLINT (6) NOT NULL DEFAULT 0 , CHANGE COLUMN `pf_group_id` `pf_group_id` MEDIUMINT (4) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `pf_allow_attachments` `pf_allow_attachments` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 ; UPDATE `core_admin_logs` SET `id`='' WHERE `id` IS NULL; ALTER TABLE `core_admin_logs` CHANGE COLUMN `id` `id` BIGINT (20) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NULL DEFAULT 0 , CHANGE COLUMN `ctime` `ctime` INT (10) NULL DEFAULT 0 ; UPDATE `core_permission_index` SET `perm_id`='' WHERE `perm_id` IS NULL; UPDATE `core_permission_index` SET `perm_type_id`=0 WHERE `perm_type_id` IS NULL; ALTER TABLE `core_permission_index` CHANGE COLUMN `perm_id` `perm_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `perm_type_id` `perm_type_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_members_warn_actions` SET `wa_id`='' WHERE `wa_id` IS NULL; ALTER TABLE `core_members_warn_actions` CHANGE COLUMN `wa_id` `wa_id` INT (11) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `wa_points` `wa_points` INT (32) NULL , CHANGE COLUMN `wa_mq` `wa_mq` INT (2) NULL , CHANGE COLUMN `wa_rpa` `wa_rpa` INT (2) NULL , CHANGE COLUMN `wa_suspend` `wa_suspend` INT (2) NULL ; UPDATE `core_members_warn_reasons` SET `wr_id`='' WHERE `wr_id` IS NULL; ALTER TABLE `core_members_warn_reasons` CHANGE COLUMN `wr_id` `wr_id` INT (11) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `wr_remove` `wr_remove` INT (2) NULL , CHANGE COLUMN `wr_order` `wr_order` INT (10) NULL ; UPDATE `core_moderators` SET `id`=0 WHERE `id` IS NULL; ALTER TABLE `core_moderators` CHANGE COLUMN `id` `id` BIGINT (20) NOT NULL DEFAULT 0 COMMENT 'ID Number', CHANGE COLUMN `updated` `updated` INT (10) NULL DEFAULT 0 COMMENT 'Updated'; UPDATE `core_attachments` SET `attach_id`='' WHERE `attach_id` IS NULL; UPDATE `core_attachments` SET `attach_thumb_width`=0 WHERE `attach_thumb_width` IS NULL; UPDATE `core_attachments` SET `attach_thumb_height`=0 WHERE `attach_thumb_height` IS NULL; UPDATE `core_attachments` SET `attach_hits`=0 WHERE `attach_hits` IS NULL; UPDATE `core_attachments` SET `attach_date`=0 WHERE `attach_date` IS NULL; UPDATE `core_attachments` SET `attach_member_id`=0 WHERE `attach_member_id` IS NULL; UPDATE `core_attachments` SET `attach_filesize`=0 WHERE `attach_filesize` IS NULL; UPDATE `core_attachments` SET `attach_img_width`=0 WHERE `attach_img_width` IS NULL; UPDATE `core_attachments` SET `attach_img_height`=0 WHERE `attach_img_height` IS NULL; UPDATE `core_attachments` SET `attach_is_archived`=0 WHERE `attach_is_archived` IS NULL; ALTER TABLE `core_attachments` CHANGE COLUMN `attach_id` `attach_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `attach_thumb_width` `attach_thumb_width` SMALLINT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `attach_thumb_height` `attach_thumb_height` SMALLINT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `attach_hits` `attach_hits` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `attach_date` `attach_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `attach_member_id` `attach_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `attach_filesize` `attach_filesize` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `attach_img_width` `attach_img_width` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `attach_img_height` `attach_img_height` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `attach_is_archived` `attach_is_archived` INT (1) NOT NULL DEFAULT 0 ; UPDATE `core_sessions` SET `search_thread_id`=0 WHERE `search_thread_id` IS NULL; UPDATE `core_sessions` SET `search_thread_time`=0 WHERE `search_thread_time` IS NULL; UPDATE `core_sessions` SET `theme_id`=0 WHERE `theme_id` IS NULL; UPDATE `core_sessions` SET `in_editor`=0 WHERE `in_editor` IS NULL; ALTER TABLE `core_sessions` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `running_time` `running_time` INT (10) NULL , CHANGE COLUMN `member_group` `member_group` SMALLINT (3) NULL , CHANGE COLUMN `search_thread_id` `search_thread_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `search_thread_time` `search_thread_time` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `current_id` `current_id` INT (10) UNSIGNED NULL , CHANGE COLUMN `theme_id` `theme_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `in_editor` `in_editor` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'User is currently using an editor'; UPDATE `core_emoticons` SET `id`='' WHERE `id` IS NULL; UPDATE `core_emoticons` SET `clickable`=1 WHERE `clickable` IS NULL; UPDATE `core_emoticons` SET `emo_position`=0 WHERE `emo_position` IS NULL; UPDATE `core_emoticons` SET `emo_set_position`=1 WHERE `emo_set_position` IS NULL; UPDATE `core_emoticons` SET `width`=0 WHERE `width` IS NULL; UPDATE `core_emoticons` SET `height`=0 WHERE `height` IS NULL; ALTER TABLE `core_emoticons` CHANGE COLUMN `id` `id` SMALLINT (3) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `clickable` `clickable` SMALLINT (2) NOT NULL DEFAULT 1 , CHANGE COLUMN `emo_position` `emo_position` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `emo_set_position` `emo_set_position` INT (10) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `width` `width` SMALLINT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `height` `height` SMALLINT (3) NOT NULL DEFAULT 0 ; UPDATE `core_files` SET `id`='' WHERE `id` IS NULL; ALTER TABLE `core_files` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number'; UPDATE `core_files_temp` SET `id`='' WHERE `id` IS NULL; UPDATE `core_files_temp` SET `time`=0 WHERE `time` IS NULL; ALTER TABLE `core_files_temp` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `time` `time` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of upload date'; UPDATE `core_question_and_answer` SET `qa_id`='' WHERE `qa_id` IS NULL; ALTER TABLE `core_question_and_answer` CHANGE COLUMN `qa_id` `qa_id` INT (11) NOT NULL AUTO_INCREMENT ; UPDATE `core_share_links` SET `share_id`='' WHERE `share_id` IS NULL; UPDATE `core_share_links` SET `share_enabled`=0 WHERE `share_enabled` IS NULL; UPDATE `core_share_links` SET `share_position`=0 WHERE `share_position` IS NULL; UPDATE `core_share_links` SET `share_canonical`=1 WHERE `share_canonical` IS NULL; UPDATE `core_share_links` SET `share_autoshare`=0 WHERE `share_autoshare` IS NULL; ALTER TABLE `core_share_links` CHANGE COLUMN `share_id` `share_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `share_enabled` `share_enabled` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `share_position` `share_position` INT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `share_canonical` `share_canonical` INT (1) NOT NULL DEFAULT 1 , CHANGE COLUMN `share_autoshare` `share_autoshare` TINYINT (3) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Flag to denote whether to show this service as an auto share option when creating content.'; UPDATE `core_incoming_emails` SET `rule_id`='' WHERE `rule_id` IS NULL; UPDATE `core_incoming_emails` SET `rule_added_by`=0 WHERE `rule_added_by` IS NULL; UPDATE `core_incoming_emails` SET `rule_added_date`=0 WHERE `rule_added_date` IS NULL; ALTER TABLE `core_incoming_emails` CHANGE COLUMN `rule_id` `rule_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `rule_added_by` `rule_added_by` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `rule_added_date` `rule_added_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_spam_service_log` SET `id`='' WHERE `id` IS NULL; UPDATE `core_spam_service_log` SET `log_date`=0 WHERE `log_date` IS NULL; UPDATE `core_spam_service_log` SET `log_code`=0 WHERE `log_code` IS NULL; ALTER TABLE `core_spam_service_log` CHANGE COLUMN `id` `id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `log_date` `log_date` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `log_code` `log_code` SMALLINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_profanity_filters` SET `wid`='' WHERE `wid` IS NULL; ALTER TABLE `core_profanity_filters` CHANGE COLUMN `wid` `wid` INT (3) NOT NULL AUTO_INCREMENT ; UPDATE `core_bulk_mail` SET `mail_id`='' WHERE `mail_id` IS NULL; UPDATE `core_bulk_mail` SET `mail_start`=0 WHERE `mail_start` IS NULL; UPDATE `core_bulk_mail` SET `mail_updated`=0 WHERE `mail_updated` IS NULL; UPDATE `core_bulk_mail` SET `mail_sentto`=0 WHERE `mail_sentto` IS NULL; UPDATE `core_bulk_mail` SET `mail_offset`=0 WHERE `mail_offset` IS NULL; ALTER TABLE `core_bulk_mail` CHANGE COLUMN `mail_id` `mail_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `mail_start` `mail_start` INT (10) NOT NULL DEFAULT 0 COMMENT 'Timestamp the bulk mail was created', CHANGE COLUMN `mail_updated` `mail_updated` INT (10) NOT NULL DEFAULT 0 COMMENT 'Timestamp last bulk mail batch was sent', CHANGE COLUMN `mail_sentto` `mail_sentto` INT (10) NOT NULL DEFAULT 0 COMMENT 'The number of users the bulk mail has been sent to', CHANGE COLUMN `mail_offset` `mail_offset` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The offset for when the next batch is sent '; UPDATE `core_tasks` SET `id`='' WHERE `id` IS NULL; UPDATE `core_tasks` SET `next_run`=0 WHERE `next_run` IS NULL; UPDATE `core_tasks` SET `lock_count`=0 WHERE `lock_count` IS NULL; UPDATE `core_tasks` SET `last_run`=0 WHERE `last_run` IS NULL; ALTER TABLE `core_tasks` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `next_run` `next_run` BIGINT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of next time task should be ran.', CHANGE COLUMN `plugin` `plugin` BIGINT (10) NULL COMMENT 'The plugin ID number which owns the task.', CHANGE COLUMN `lock_count` `lock_count` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'How many times the task has been in a locked state without a successful run. A count of 3 will trigger a dashboard warning.', CHANGE COLUMN `last_run` `last_run` BIGINT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The timestamp the task was last run, 0 if never.'; UPDATE `core_tasks_log` SET `time`=0 WHERE `time` IS NULL; ALTER TABLE `core_tasks_log` CHANGE COLUMN `task` `task` BIGINT (20) UNSIGNED NULL COMMENT 'Task ID number', CHANGE COLUMN `time` `time` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_acronyms` SET `a_id`='' WHERE `a_id` IS NULL; ALTER TABLE `core_acronyms` CHANGE COLUMN `a_id` `a_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT ; UPDATE `core_email_templates` SET `template_id`='' WHERE `template_id` IS NULL; UPDATE `core_email_templates` SET `template_parent`=0 WHERE `template_parent` IS NULL; ALTER TABLE `core_email_templates` CHANGE COLUMN `template_id` `template_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `template_parent` `template_parent` BIGINT (20) NOT NULL DEFAULT 0 COMMENT 'This column holds the template_id of the original un-edited version of the template'; UPDATE `core_message_topics` SET `mt_id`='' WHERE `mt_id` IS NULL; UPDATE `core_message_topics` SET `mt_date`=0 WHERE `mt_date` IS NULL; UPDATE `core_message_topics` SET `mt_hasattach`=0 WHERE `mt_hasattach` IS NULL; UPDATE `core_message_topics` SET `mt_starter_id`=0 WHERE `mt_starter_id` IS NULL; UPDATE `core_message_topics` SET `mt_start_time`=0 WHERE `mt_start_time` IS NULL; UPDATE `core_message_topics` SET `mt_last_post_time`=0 WHERE `mt_last_post_time` IS NULL; UPDATE `core_message_topics` SET `mt_to_count`=0 WHERE `mt_to_count` IS NULL; UPDATE `core_message_topics` SET `mt_to_member_id`=0 WHERE `mt_to_member_id` IS NULL; UPDATE `core_message_topics` SET `mt_replies`=0 WHERE `mt_replies` IS NULL; UPDATE `core_message_topics` SET `mt_first_msg_id`=0 WHERE `mt_first_msg_id` IS NULL; UPDATE `core_message_topics` SET `mt_is_draft`=0 WHERE `mt_is_draft` IS NULL; UPDATE `core_message_topics` SET `mt_is_deleted`=0 WHERE `mt_is_deleted` IS NULL; UPDATE `core_message_topics` SET `mt_is_system`=0 WHERE `mt_is_system` IS NULL; ALTER TABLE `core_message_topics` CHANGE COLUMN `mt_id` `mt_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `mt_date` `mt_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_hasattach` `mt_hasattach` SMALLINT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_starter_id` `mt_starter_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_start_time` `mt_start_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_last_post_time` `mt_last_post_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_to_count` `mt_to_count` INT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_to_member_id` `mt_to_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_replies` `mt_replies` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_first_msg_id` `mt_first_msg_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_is_draft` `mt_is_draft` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_is_deleted` `mt_is_deleted` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `mt_is_system` `mt_is_system` INT (1) NOT NULL DEFAULT 0 ; UPDATE `core_message_posts` SET `msg_id`='' WHERE `msg_id` IS NULL; UPDATE `core_message_posts` SET `msg_topic_id`=0 WHERE `msg_topic_id` IS NULL; UPDATE `core_message_posts` SET `msg_author_id`=0 WHERE `msg_author_id` IS NULL; UPDATE `core_message_posts` SET `msg_is_first_post`=0 WHERE `msg_is_first_post` IS NULL; ALTER TABLE `core_message_posts` CHANGE COLUMN `msg_id` `msg_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `msg_topic_id` `msg_topic_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `msg_date` `msg_date` INT (10) NULL , CHANGE COLUMN `msg_author_id` `msg_author_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `msg_is_first_post` `msg_is_first_post` INT (1) NOT NULL DEFAULT 0 ; UPDATE `core_message_topic_user_map` SET `map_id`='' WHERE `map_id` IS NULL; UPDATE `core_message_topic_user_map` SET `map_user_id`=0 WHERE `map_user_id` IS NULL; UPDATE `core_message_topic_user_map` SET `map_topic_id`=0 WHERE `map_topic_id` IS NULL; UPDATE `core_message_topic_user_map` SET `map_read_time`=0 WHERE `map_read_time` IS NULL; UPDATE `core_message_topic_user_map` SET `map_user_active`=0 WHERE `map_user_active` IS NULL; UPDATE `core_message_topic_user_map` SET `map_user_banned`=0 WHERE `map_user_banned` IS NULL; UPDATE `core_message_topic_user_map` SET `map_has_unread`=0 WHERE `map_has_unread` IS NULL; UPDATE `core_message_topic_user_map` SET `map_is_system`=0 WHERE `map_is_system` IS NULL; UPDATE `core_message_topic_user_map` SET `map_is_starter`=0 WHERE `map_is_starter` IS NULL; UPDATE `core_message_topic_user_map` SET `map_left_time`=0 WHERE `map_left_time` IS NULL; UPDATE `core_message_topic_user_map` SET `map_ignore_notification`=0 WHERE `map_ignore_notification` IS NULL; UPDATE `core_message_topic_user_map` SET `map_last_topic_reply`=0 WHERE `map_last_topic_reply` IS NULL; ALTER TABLE `core_message_topic_user_map` CHANGE COLUMN `map_id` `map_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `map_user_id` `map_user_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_topic_id` `map_topic_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_read_time` `map_read_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_user_active` `map_user_active` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_user_banned` `map_user_banned` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_has_unread` `map_has_unread` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_is_system` `map_is_system` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_is_starter` `map_is_starter` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_left_time` `map_left_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_ignore_notification` `map_ignore_notification` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `map_last_topic_reply` `map_last_topic_reply` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_mail_error_logs` SET `mlog_id`='' WHERE `mlog_id` IS NULL; UPDATE `core_mail_error_logs` SET `mlog_date`=0 WHERE `mlog_date` IS NULL; ALTER TABLE `core_mail_error_logs` CHANGE COLUMN `mlog_id` `mlog_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `mlog_date` `mlog_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_rc_comments` SET `id`='' WHERE `id` IS NULL; UPDATE `core_rc_comments` SET `rid`=0 WHERE `rid` IS NULL; UPDATE `core_rc_comments` SET `comment_by`=0 WHERE `comment_by` IS NULL; UPDATE `core_rc_comments` SET `comment_date`=0 WHERE `comment_date` IS NULL; UPDATE `core_rc_comments` SET `approved`=1 WHERE `approved` IS NULL; UPDATE `core_rc_comments` SET `edit_date`=0 WHERE `edit_date` IS NULL; ALTER TABLE `core_rc_comments` CHANGE COLUMN `id` `id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `rid` `rid` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_by` `comment_by` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_date` `comment_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `approved` `approved` TINYINT (4) NOT NULL DEFAULT 1 , CHANGE COLUMN `edit_date` `edit_date` INT (11) NOT NULL DEFAULT 0 ; UPDATE `core_rc_reports` SET `id`='' WHERE `id` IS NULL; UPDATE `core_rc_reports` SET `rid`=0 WHERE `rid` IS NULL; UPDATE `core_rc_reports` SET `report_by`=0 WHERE `report_by` IS NULL; UPDATE `core_rc_reports` SET `date_reported`=0 WHERE `date_reported` IS NULL; UPDATE `core_rc_reports` SET `report_type`=0 WHERE `report_type` IS NULL; ALTER TABLE `core_rc_reports` CHANGE COLUMN `id` `id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `rid` `rid` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `report_by` `report_by` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `date_reported` `date_reported` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `report_type` `report_type` INT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_rc_index` SET `id`='' WHERE `id` IS NULL; UPDATE `core_rc_index` SET `content_id`=0 WHERE `content_id` IS NULL; UPDATE `core_rc_index` SET `num_reports`=1 WHERE `num_reports` IS NULL; UPDATE `core_rc_index` SET `num_comments`=0 WHERE `num_comments` IS NULL; UPDATE `core_rc_index` SET `first_report_by`=0 WHERE `first_report_by` IS NULL; UPDATE `core_rc_index` SET `first_report_date`=0 WHERE `first_report_date` IS NULL; UPDATE `core_rc_index` SET `author`=0 WHERE `author` IS NULL; UPDATE `core_rc_index` SET `auto_moderation_exempt`='' WHERE `auto_moderation_exempt` IS NULL; ALTER TABLE `core_rc_index` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', DROP INDEX `content_lookup`, CHANGE COLUMN `content_id` `content_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The ID number of the content that was reported.', ADD KEY `content_lookup` (`class`(171),`content_id`), CHANGE COLUMN `perm_id` `perm_id` BIGINT (29) UNSIGNED NULL COMMENT 'The ID number from the core_permission_index table which indicates who can view this report.', CHANGE COLUMN `num_reports` `num_reports` INT (10) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Number of reports received.', CHANGE COLUMN `num_comments` `num_comments` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Number of comments moderators have made on this report.', CHANGE COLUMN `first_report_by` `first_report_by` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The ID number of the member who submitted the first report.', CHANGE COLUMN `first_report_date` `first_report_date` INT (10) NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of when the first report was submitted.', CHANGE COLUMN `last_updated` `last_updated` INT (10) NULL COMMENT 'Unix timestamp of the last time a comment or report was made (for read/unread marking)', CHANGE COLUMN `author` `author` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The ID number of the user who submitted the reported content.', CHANGE COLUMN `auto_moderation_exempt` `auto_moderation_exempt` INT (1) UNSIGNED NOT NULL ; UPDATE `core_item_markers` SET `item_member_id`=0 WHERE `item_member_id` IS NULL; UPDATE `core_item_markers` SET `item_global_reset`=0 WHERE `item_global_reset` IS NULL; UPDATE `core_item_markers` SET `item_app_key_1`=0 WHERE `item_app_key_1` IS NULL; UPDATE `core_item_markers` SET `item_app_key_2`=0 WHERE `item_app_key_2` IS NULL; UPDATE `core_item_markers` SET `item_app_key_3`=0 WHERE `item_app_key_3` IS NULL; ALTER TABLE `core_item_markers` CHANGE COLUMN `item_member_id` `item_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `item_global_reset` `item_global_reset` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `item_app_key_1` `item_app_key_1` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `item_app_key_2` `item_app_key_2` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `item_app_key_3` `item_app_key_3` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_upgrade_history` SET `upgrade_id`='' WHERE `upgrade_id` IS NULL; UPDATE `core_upgrade_history` SET `upgrade_version_id`=0 WHERE `upgrade_version_id` IS NULL; UPDATE `core_upgrade_history` SET `upgrade_date`=0 WHERE `upgrade_date` IS NULL; UPDATE `core_upgrade_history` SET `upgrade_mid`=0 WHERE `upgrade_mid` IS NULL; ALTER TABLE `core_upgrade_history` CHANGE COLUMN `upgrade_id` `upgrade_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `upgrade_version_id` `upgrade_version_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `upgrade_date` `upgrade_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `upgrade_mid` `upgrade_mid` BIGINT (20) NOT NULL DEFAULT 0 ; UPDATE `core_members_warn_logs` SET `wl_id`='' WHERE `wl_id` IS NULL; ALTER TABLE `core_members_warn_logs` CHANGE COLUMN `wl_id` `wl_id` INT (11) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `wl_member` `wl_member` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `wl_moderator` `wl_moderator` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `wl_date` `wl_date` INT (10) NULL , CHANGE COLUMN `wl_reason` `wl_reason` INT (10) NULL , CHANGE COLUMN `wl_points` `wl_points` INT (5) NULL , CHANGE COLUMN `wl_expire_date` `wl_expire_date` INT (10) NULL ; UPDATE `core_plugins` SET `plugin_id`='' WHERE `plugin_id` IS NULL; UPDATE `core_plugins` SET `plugin_version_long`=10000 WHERE `plugin_version_long` IS NULL; UPDATE `core_plugins` SET `plugin_order`=0 WHERE `plugin_order` IS NULL; ALTER TABLE `core_plugins` CHANGE COLUMN `plugin_id` `plugin_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `plugin_version_long` `plugin_version_long` MEDIUMINT (8) UNSIGNED NOT NULL DEFAULT 10000 COMMENT 'Currently installed version (system)', CHANGE COLUMN `plugin_update_check_last` `plugin_update_check_last` INT (10) NULL COMMENT 'Unix timestamp that the plugin was last checked for updates', CHANGE COLUMN `plugin_order` `plugin_order` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The order plugins are executed'; UPDATE `core_themes` SET `set_id`='' WHERE `set_id` IS NULL; UPDATE `core_themes` SET `set_parent_id`=0 WHERE `set_parent_id` IS NULL; UPDATE `core_themes` SET `set_is_default`=0 WHERE `set_is_default` IS NULL; UPDATE `core_themes` SET `set_added`=0 WHERE `set_added` IS NULL; UPDATE `core_themes` SET `set_updated`=0 WHERE `set_updated` IS NULL; UPDATE `core_themes` SET `set_hide_from_list`=0 WHERE `set_hide_from_list` IS NULL; UPDATE `core_themes` SET `set_order`=0 WHERE `set_order` IS NULL; UPDATE `core_themes` SET `set_by_skin_gen`=0 WHERE `set_by_skin_gen` IS NULL; UPDATE `core_themes` SET `set_is_acp_default`=0 WHERE `set_is_acp_default` IS NULL; UPDATE `core_themes` SET `set_customized`=0 WHERE `set_customized` IS NULL; ALTER TABLE `core_themes` CHANGE COLUMN `set_id` `set_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `set_parent_id` `set_parent_id` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `set_is_default` `set_is_default` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `set_added` `set_added` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `set_updated` `set_updated` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `set_hide_from_list` `set_hide_from_list` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `set_order` `set_order` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `set_by_skin_gen` `set_by_skin_gen` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `set_long_version` `set_long_version` INT (10) UNSIGNED NULL COMMENT 'Integer version', CHANGE COLUMN `set_update_last_check` `set_update_last_check` INT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Unix timestamp of last check', CHANGE COLUMN `set_is_acp_default` `set_is_acp_default` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Is default ACP theme?', CHANGE COLUMN `set_customized` `set_customized` INT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_theme_templates` SET `template_id`='' WHERE `template_id` IS NULL; UPDATE `core_theme_templates` SET `template_set_id`=0 WHERE `template_set_id` IS NULL; UPDATE `core_theme_templates` SET `template_updated`=0 WHERE `template_updated` IS NULL; UPDATE `core_theme_templates` SET `template_removable`=0 WHERE `template_removable` IS NULL; UPDATE `core_theme_templates` SET `template_added_to`=0 WHERE `template_added_to` IS NULL; UPDATE `core_theme_templates` SET `template_user_added`=0 WHERE `template_user_added` IS NULL; UPDATE `core_theme_templates` SET `template_user_edited`=0 WHERE `template_user_edited` IS NULL; CREATE TABLE `core_theme_templates_new` LIKE `core_theme_templates`; ALTER TABLE `core_theme_templates_new` CHANGE COLUMN `template_id` `template_id` INT (10) NOT NULL AUTO_INCREMENT , DROP INDEX `unique_key`, CHANGE COLUMN `template_set_id` `template_set_id` INT (10) NOT NULL DEFAULT 0 , ADD UNIQUE KEY `unique_key` (`template_set_id`,`template_location`(50),`template_app`(31),`template_group`(50),`template_name`(50)), CHANGE COLUMN `template_updated` `template_updated` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `template_removable` `template_removable` INT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `template_added_to` `template_added_to` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `template_user_added` `template_user_added` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `template_user_edited` `template_user_edited` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `template_plugin` `template_plugin` BIGINT (20) UNSIGNED NULL COMMENT 'The plugin ID, if created by a plugin'; INSERT IGNORE INTO `core_theme_templates_new` SELECT * FROM `core_theme_templates`; DROP TABLE `core_theme_templates`; RENAME TABLE `core_theme_templates_new` TO `core_theme_templates`; UPDATE `core_theme_css` SET `css_id`='' WHERE `css_id` IS NULL; UPDATE `core_theme_css` SET `css_set_id`=0 WHERE `css_set_id` IS NULL; UPDATE `core_theme_css` SET `css_updated`=0 WHERE `css_updated` IS NULL; UPDATE `core_theme_css` SET `css_position`=0 WHERE `css_position` IS NULL; UPDATE `core_theme_css` SET `css_added_to`=0 WHERE `css_added_to` IS NULL; UPDATE `core_theme_css` SET `css_app_hide`=0 WHERE `css_app_hide` IS NULL; UPDATE `core_theme_css` SET `css_removed`=0 WHERE `css_removed` IS NULL; CREATE TABLE `core_theme_css_new` LIKE `core_theme_css`; ALTER TABLE `core_theme_css_new` CHANGE COLUMN `css_id` `css_id` INT (10) NOT NULL AUTO_INCREMENT , DROP INDEX `unique_key`, CHANGE COLUMN `css_set_id` `css_set_id` INT (10) NOT NULL DEFAULT 0 , ADD UNIQUE KEY `unique_key` (`css_set_id`,`css_app`(27),`css_location`(44),`css_path`(66),`css_name`(44)), CHANGE COLUMN `css_updated` `css_updated` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `css_position` `css_position` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `css_added_to` `css_added_to` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `css_app_hide` `css_app_hide` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `css_removed` `css_removed` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `css_hidden` `css_hidden` TINYINT (3) UNSIGNED NULL COMMENT 'Skip this file when compiling', CHANGE COLUMN `css_user_edited` `css_user_edited` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `css_plugin` `css_plugin` BIGINT (20) UNSIGNED NULL COMMENT 'The plugin ID, if created by a plugin'; INSERT IGNORE INTO `core_theme_css_new` SELECT * FROM `core_theme_css`; DROP TABLE `core_theme_css`; RENAME TABLE `core_theme_css_new` TO `core_theme_css`; UPDATE `core_theme_conflict` SET `conflict_id`='' WHERE `conflict_id` IS NULL; UPDATE `core_theme_conflict` SET `conflict_set_id`=0 WHERE `conflict_set_id` IS NULL; UPDATE `core_theme_conflict` SET `conflict_item_id`=0 WHERE `conflict_item_id` IS NULL; UPDATE `core_theme_conflict` SET `conflict_long_version`=0 WHERE `conflict_long_version` IS NULL; UPDATE `core_theme_conflict` SET `conflict_date`=0 WHERE `conflict_date` IS NULL; ALTER TABLE `core_theme_conflict` CHANGE COLUMN `conflict_id` `conflict_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `conflict_set_id` `conflict_set_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `conflict_item_id` `conflict_item_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `conflict_long_version` `conflict_long_version` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `conflict_date` `conflict_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_theme_content_history` SET `content_id`='' WHERE `content_id` IS NULL; UPDATE `core_theme_content_history` SET `content_set_id`=0 WHERE `content_set_id` IS NULL; UPDATE `core_theme_content_history` SET `content_long_version`=0 WHERE `content_long_version` IS NULL; UPDATE `core_theme_content_history` SET `content_date`=0 WHERE `content_date` IS NULL; ALTER TABLE `core_theme_content_history` CHANGE COLUMN `content_id` `content_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `content_set_id` `content_set_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `content_long_version` `content_long_version` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `content_date` `content_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_theme_resources` SET `resource_id`='' WHERE `resource_id` IS NULL; UPDATE `core_theme_resources` SET `resource_set_id`=0 WHERE `resource_set_id` IS NULL; UPDATE `core_theme_resources` SET `resource_added`=0 WHERE `resource_added` IS NULL; ALTER TABLE `core_theme_resources` CHANGE COLUMN `resource_id` `resource_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `resource_set_id` `resource_set_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `resource_added` `resource_added` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `resource_plugin` `resource_plugin` BIGINT (20) UNSIGNED NULL COMMENT 'The plugin ID, if created by a plugin'; UPDATE `core_theme_settings_fields` SET `sc_id`='' WHERE `sc_id` IS NULL; UPDATE `core_theme_settings_fields` SET `sc_set_id`=0 WHERE `sc_set_id` IS NULL; UPDATE `core_theme_settings_fields` SET `sc_multiple`=0 WHERE `sc_multiple` IS NULL; UPDATE `core_theme_settings_fields` SET `sc_order`=0 WHERE `sc_order` IS NULL; CREATE TABLE `core_theme_settings_fields_new` LIKE `core_theme_settings_fields`; ALTER TABLE `core_theme_settings_fields_new` CHANGE COLUMN `sc_id` `sc_id` INT (10) NOT NULL AUTO_INCREMENT , DROP INDEX `replace_key`, CHANGE COLUMN `sc_set_id` `sc_set_id` INT (10) NOT NULL DEFAULT 0 , ADD UNIQUE KEY `replace_key` (`sc_set_id`,`sc_key`(90),`sc_app`(90)), CHANGE COLUMN `sc_multiple` `sc_multiple` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `sc_updated` `sc_updated` INT (10) UNSIGNED NULL DEFAULT 0 , CHANGE COLUMN `sc_show_in_vse` `sc_show_in_vse` INT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Show this theme setting in the easy mode editor', CHANGE COLUMN `sc_order` `sc_order` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; INSERT IGNORE INTO `core_theme_settings_fields_new` SELECT * FROM `core_theme_settings_fields`; DROP TABLE `core_theme_settings_fields`; RENAME TABLE `core_theme_settings_fields_new` TO `core_theme_settings_fields`; UPDATE `core_theme_settings_values` SET `sv_id`=0 WHERE `sv_id` IS NULL; ALTER TABLE `core_theme_settings_values` CHANGE COLUMN `sv_id` `sv_id` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_error_logs` SET `log_id`='' WHERE `log_id` IS NULL; UPDATE `core_error_logs` SET `log_member`=0 WHERE `log_member` IS NULL; UPDATE `core_error_logs` SET `log_date`=0 WHERE `log_date` IS NULL; ALTER TABLE `core_error_logs` CHANGE COLUMN `log_id` `log_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `log_member` `log_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `log_date` `log_date` INT (11) NOT NULL DEFAULT 0 ; UPDATE `core_admin_login_logs` SET `admin_id`='' WHERE `admin_id` IS NULL; UPDATE `core_admin_login_logs` SET `admin_time`=0 WHERE `admin_time` IS NULL; UPDATE `core_admin_login_logs` SET `admin_success`=0 WHERE `admin_success` IS NULL; ALTER TABLE `core_admin_login_logs` CHANGE COLUMN `admin_id` `admin_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `admin_time` `admin_time` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `admin_success` `admin_success` INT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_hooks` SET `id`='' WHERE `id` IS NULL; ALTER TABLE `core_hooks` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `plugin` `plugin` BIGINT (20) UNSIGNED NULL COMMENT 'Plugin ID, if belongs to a plugin'; UPDATE `core_javascript` SET `javascript_id`='' WHERE `javascript_id` IS NULL; ALTER TABLE `core_javascript` CHANGE COLUMN `javascript_id` `javascript_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `javascript_position` `javascript_position` INT (10) UNSIGNED NULL DEFAULT 0 ; UPDATE `core_ignored_users` SET `ignore_id`='' WHERE `ignore_id` IS NULL; UPDATE `core_ignored_users` SET `ignore_owner_id`=0 WHERE `ignore_owner_id` IS NULL; UPDATE `core_ignored_users` SET `ignore_ignore_id`=0 WHERE `ignore_ignore_id` IS NULL; UPDATE `core_ignored_users` SET `ignore_messages`=0 WHERE `ignore_messages` IS NULL; UPDATE `core_ignored_users` SET `ignore_topics`=0 WHERE `ignore_topics` IS NULL; UPDATE `core_ignored_users` SET `ignore_signatures`=0 WHERE `ignore_signatures` IS NULL; UPDATE `core_ignored_users` SET `ignore_mentions`=0 WHERE `ignore_mentions` IS NULL; ALTER TABLE `core_ignored_users` CHANGE COLUMN `ignore_id` `ignore_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `ignore_owner_id` `ignore_owner_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `ignore_ignore_id` `ignore_ignore_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `ignore_messages` `ignore_messages` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `ignore_topics` `ignore_topics` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `ignore_signatures` `ignore_signatures` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `ignore_mentions` `ignore_mentions` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_announcements` SET `announce_id`='' WHERE `announce_id` IS NULL; UPDATE `core_announcements` SET `announce_member_id`=0 WHERE `announce_member_id` IS NULL; UPDATE `core_announcements` SET `announce_views`=0 WHERE `announce_views` IS NULL; UPDATE `core_announcements` SET `announce_start`=0 WHERE `announce_start` IS NULL; UPDATE `core_announcements` SET `announce_end`=0 WHERE `announce_end` IS NULL; ALTER TABLE `core_announcements` CHANGE COLUMN `announce_id` `announce_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `announce_member_id` `announce_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `announce_views` `announce_views` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `announce_start` `announce_start` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `announce_end` `announce_end` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_seo_meta` SET `meta_id`='' WHERE `meta_id` IS NULL; ALTER TABLE `core_seo_meta` CHANGE COLUMN `meta_id` `meta_id` INT (11) NOT NULL AUTO_INCREMENT ; UPDATE `core_notification_preferences` SET `member_id`=0 WHERE `member_id` IS NULL; ALTER TABLE `core_notification_preferences` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Member ID Number'; UPDATE `core_notifications` SET `id`='' WHERE `id` IS NULL; UPDATE `core_notifications` SET `member`=0 WHERE `member` IS NULL; UPDATE `core_notifications` SET `sent_time`=0 WHERE `sent_time` IS NULL; UPDATE `core_notifications` SET `updated_time`=0 WHERE `updated_time` IS NULL; ALTER TABLE `core_notifications` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `member` `member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The member ID', CHANGE COLUMN `item_id` `item_id` BIGINT (20) UNSIGNED NULL COMMENT 'The ID number for the item the notification is about', CHANGE COLUMN `sent_time` `sent_time` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of the time the notification was sent.', CHANGE COLUMN `read_time` `read_time` INT (10) UNSIGNED NULL COMMENT 'Unix timestamp of the time the notification was read.', CHANGE COLUMN `updated_time` `updated_time` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of when the notification was last updated (or sent)', CHANGE COLUMN `item_sub_id` `item_sub_id` BIGINT (20) UNSIGNED NULL COMMENT 'Item Sub ID'; UPDATE `core_attachments_map` SET `attachment_id`=0 WHERE `attachment_id` IS NULL; ALTER TABLE `core_attachments_map` CHANGE COLUMN `attachment_id` `attachment_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The attachment ID', DROP INDEX `map_lookup`, CHANGE COLUMN `id1` `id1` BIGINT (20) UNSIGNED NULL COMMENT 'Primary ID number for content claiming attachment', ADD KEY `map_lookup` (`location_key`(171),`id1`), CHANGE COLUMN `id2` `id2` BIGINT (20) UNSIGNED NULL COMMENT 'Secondary ID number for content claiming attachment'; UPDATE `core_leaders_groups` SET `group_id`='' WHERE `group_id` IS NULL; UPDATE `core_leaders_groups` SET `group_position`=0 WHERE `group_position` IS NULL; ALTER TABLE `core_leaders_groups` CHANGE COLUMN `group_id` `group_id` MEDIUMINT (8) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `group_position` `group_position` MEDIUMINT (8) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_leaders` SET `leader_id`='' WHERE `leader_id` IS NULL; UPDATE `core_leaders` SET `leader_type_id`=0 WHERE `leader_type_id` IS NULL; UPDATE `core_leaders` SET `leader_group_id`=0 WHERE `leader_group_id` IS NULL; ALTER TABLE `core_leaders` CHANGE COLUMN `leader_id` `leader_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Primary ID', CHANGE COLUMN `leader_type_id` `leader_type_id` BIGINT (20) NOT NULL DEFAULT 0 COMMENT 'Member or group ID', CHANGE COLUMN `leader_group_id` `leader_group_id` MEDIUMINT (8) NOT NULL DEFAULT 0 COMMENT 'The group to display in (core_leaders_group.group_id)', CHANGE COLUMN `leader_position` `leader_position` BIGINT (20) NULL COMMENT 'Position'; UPDATE `core_file_storage` SET `id`='' WHERE `id` IS NULL; ALTER TABLE `core_file_storage` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number'; UPDATE `core_advertisements` SET `ad_id`='' WHERE `ad_id` IS NULL; UPDATE `core_advertisements` SET `ad_impressions`=0 WHERE `ad_impressions` IS NULL; UPDATE `core_advertisements` SET `ad_clicks`=0 WHERE `ad_clicks` IS NULL; UPDATE `core_advertisements` SET `ad_active`=0 WHERE `ad_active` IS NULL; UPDATE `core_advertisements` SET `ad_start`=0 WHERE `ad_start` IS NULL; UPDATE `core_advertisements` SET `ad_end`=0 WHERE `ad_end` IS NULL; UPDATE `core_advertisements` SET `ad_maximum_value`=0 WHERE `ad_maximum_value` IS NULL; UPDATE `core_advertisements` SET `ad_type`=0 WHERE `ad_type` IS NULL; ALTER TABLE `core_advertisements` CHANGE COLUMN `ad_id` `ad_id` BIGINT (20) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `ad_impressions` `ad_impressions` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The number of impressions for this ad, only tracked with image ads', CHANGE COLUMN `ad_clicks` `ad_clicks` INT (11) NOT NULL DEFAULT 0 COMMENT 'The number of clicks for this ad, only tracked with image ads', CHANGE COLUMN `ad_active` `ad_active` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `ad_start` `ad_start` INT (11) NOT NULL DEFAULT 0 COMMENT 'Starting timestamp for this ad', CHANGE COLUMN `ad_end` `ad_end` INT (11) NOT NULL DEFAULT 0 COMMENT 'Ending timestamp for this ad', CHANGE COLUMN `ad_maximum_value` `ad_maximum_value` INT (11) NOT NULL DEFAULT 0 COMMENT 'Maximum number of clicks or impressions allowed (for image ads only)', CHANGE COLUMN `ad_member` `ad_member` BIGINT (20) UNSIGNED NULL COMMENT 'If created by Nexus, the customer ID', CHANGE COLUMN `ad_type` `ad_type` TINYINT (4) NOT NULL DEFAULT 0 COMMENT '1 = HTML, 2 = images, 3 = email', CHANGE COLUMN `ad_email_views` `ad_email_views` INT (11) NULL COMMENT 'Tracks the number of times an email containing the ad has been opened/viewed'; UPDATE `core_edit_history` SET `id`='' WHERE `id` IS NULL; UPDATE `core_edit_history` SET `comment_id`=0 WHERE `comment_id` IS NULL; UPDATE `core_edit_history` SET `member`=0 WHERE `member` IS NULL; UPDATE `core_edit_history` SET `time`=0 WHERE `time` IS NULL; ALTER TABLE `core_edit_history` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', DROP INDEX `edit_log`, CHANGE COLUMN `comment_id` `comment_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The comment ID', ADD KEY `edit_log` (`class`(161),`comment_id`,`time`), CHANGE COLUMN `member` `member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The ID number of the member making the edit', CHANGE COLUMN `time` `time` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of the date the edit was made'; UPDATE `core_moderator_logs` SET `id`='' WHERE `id` IS NULL; ALTER TABLE `core_moderator_logs` CHANGE COLUMN `id` `id` BIGINT (20) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `member_id` `member_id` BIGINT (20) NULL DEFAULT 0 , CHANGE COLUMN `ctime` `ctime` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `item_id` `item_id` INT (10) UNSIGNED NULL ; UPDATE `core_widgets` SET `id`='' WHERE `id` IS NULL; UPDATE `core_widgets` SET `allow_reuse`=0 WHERE `allow_reuse` IS NULL; UPDATE `core_widgets` SET `embeddable`=0 WHERE `embeddable` IS NULL; ALTER TABLE `core_widgets` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `allow_reuse` `allow_reuse` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'If 1, the widget can be re-used instead of having the block vanish from the manager\'s block list.', CHANGE COLUMN `embeddable` `embeddable` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Determines if Pages can embed this widget in a custom block.'; UPDATE `core_tags` SET `tag_id`='' WHERE `tag_id` IS NULL; UPDATE `core_tags` SET `tag_meta_id`=0 WHERE `tag_meta_id` IS NULL; UPDATE `core_tags` SET `tag_meta_parent_id`=0 WHERE `tag_meta_parent_id` IS NULL; UPDATE `core_tags` SET `tag_member_id`=0 WHERE `tag_member_id` IS NULL; UPDATE `core_tags` SET `tag_added`=0 WHERE `tag_added` IS NULL; UPDATE `core_tags` SET `tag_prefix`=0 WHERE `tag_prefix` IS NULL; ALTER TABLE `core_tags` CHANGE COLUMN `tag_id` `tag_id` BIGINT (20) NOT NULL AUTO_INCREMENT , DROP INDEX `tag_app`, CHANGE COLUMN `tag_meta_id` `tag_meta_id` INT (10) NOT NULL DEFAULT 0 , ADD KEY `tag_app` (`tag_meta_app`(90),`tag_meta_area`(90),`tag_meta_id`), CHANGE COLUMN `tag_meta_parent_id` `tag_meta_parent_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `tag_member_id` `tag_member_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `tag_added` `tag_added` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `tag_prefix` `tag_prefix` INT (1) NOT NULL DEFAULT 0 ; UPDATE `core_tags_cache` SET `tag_cache_date`=0 WHERE `tag_cache_date` IS NULL; ALTER TABLE `core_tags_cache` CHANGE COLUMN `tag_cache_date` `tag_cache_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_tags_perms` SET `tag_perm_visible`=1 WHERE `tag_perm_visible` IS NULL; ALTER TABLE `core_tags_perms` DROP INDEX `tag_lookup`, CHANGE COLUMN `tag_perm_visible` `tag_perm_visible` INT (1) NOT NULL DEFAULT 1 , ADD KEY `tag_lookup` (`tag_perm_text`(190),`tag_perm_visible`); UPDATE `core_reputation_index` SET `id`='' WHERE `id` IS NULL; UPDATE `core_reputation_index` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `core_reputation_index` SET `type_id`=0 WHERE `type_id` IS NULL; UPDATE `core_reputation_index` SET `rep_date`=0 WHERE `rep_date` IS NULL; UPDATE `core_reputation_index` SET `member_received`=0 WHERE `member_received` IS NULL; UPDATE `core_reputation_index` SET `item_id`=0 WHERE `item_id` IS NULL; UPDATE `core_reputation_index` SET `reaction`=0 WHERE `reaction` IS NULL; ALTER TABLE `core_reputation_index` CHANGE COLUMN `id` `id` BIGINT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `type_id` `type_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `rep_date` `rep_date` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `member_received` `member_received` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `item_id` `item_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `reaction` `reaction` BIGINT (20) NOT NULL DEFAULT 0 ; UPDATE `core_follow` SET `follow_rel_id`=0 WHERE `follow_rel_id` IS NULL; UPDATE `core_follow` SET `follow_member_id`=0 WHERE `follow_member_id` IS NULL; UPDATE `core_follow` SET `follow_is_anon`=0 WHERE `follow_is_anon` IS NULL; UPDATE `core_follow` SET `follow_added`=0 WHERE `follow_added` IS NULL; UPDATE `core_follow` SET `follow_notify_do`=0 WHERE `follow_notify_do` IS NULL; UPDATE `core_follow` SET `follow_notify_sent`=0 WHERE `follow_notify_sent` IS NULL; UPDATE `core_follow` SET `follow_visible`=1 WHERE `follow_visible` IS NULL; ALTER TABLE `core_follow` DROP INDEX `followers`, CHANGE COLUMN `follow_rel_id` `follow_rel_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , ADD KEY `followers` (`follow_app`(69),`follow_area`(92),`follow_rel_id`,`follow_notify_freq`(9)), DROP INDEX `follow_stream`, CHANGE COLUMN `follow_member_id` `follow_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , ADD KEY `follow_stream` (`follow_app`(73),`follow_area`(98),`follow_member_id`), CHANGE COLUMN `follow_is_anon` `follow_is_anon` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `follow_added` `follow_added` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `follow_notify_do` `follow_notify_do` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `follow_notify_sent` `follow_notify_sent` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `follow_visible` `follow_visible` TINYINT (4) NOT NULL DEFAULT 1 ; UPDATE `core_polls` SET `pid`='' WHERE `pid` IS NULL; UPDATE `core_polls` SET `starter_id`=0 WHERE `starter_id` IS NULL; UPDATE `core_polls` SET `votes`=0 WHERE `votes` IS NULL; UPDATE `core_polls` SET `poll_view_voters`=0 WHERE `poll_view_voters` IS NULL; UPDATE `core_polls` SET `poll_closed`=0 WHERE `poll_closed` IS NULL; UPDATE `core_polls` SET `poll_close_date`=-1 WHERE `poll_close_date` IS NULL; ALTER TABLE `core_polls` CHANGE COLUMN `pid` `pid` MEDIUMINT (8) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `start_date` `start_date` INT (10) NULL , CHANGE COLUMN `starter_id` `starter_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `votes` `votes` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `poll_view_voters` `poll_view_voters` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `poll_closed` `poll_closed` INT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `poll_close_date` `poll_close_date` INT (10) NOT NULL DEFAULT -1 ; UPDATE `core_voters` SET `vid`='' WHERE `vid` IS NULL; UPDATE `core_voters` SET `vote_date`=0 WHERE `vote_date` IS NULL; UPDATE `core_voters` SET `tid`=0 WHERE `tid` IS NULL; UPDATE `core_voters` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `core_voters` SET `forum_id`=0 WHERE `forum_id` IS NULL; UPDATE `core_voters` SET `poll`=0 WHERE `poll` IS NULL; ALTER TABLE `core_voters` CHANGE COLUMN `vid` `vid` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `vote_date` `vote_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `tid` `tid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `forum_id` `forum_id` SMALLINT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `poll` `poll` MEDIUMINT (8) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The poll ID'; UPDATE `core_ratings` SET `id`='' WHERE `id` IS NULL; UPDATE `core_ratings` SET `item_id`=0 WHERE `item_id` IS NULL; UPDATE `core_ratings` SET `member`=0 WHERE `member` IS NULL; UPDATE `core_ratings` SET `rating`=0 WHERE `rating` IS NULL; ALTER TABLE `core_ratings` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `item_id` `item_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The content item ID', CHANGE COLUMN `member` `member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The member ID', CHANGE COLUMN `rating` `rating` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The rating'; UPDATE `core_member_status_updates` SET `status_id`='' WHERE `status_id` IS NULL; UPDATE `core_member_status_updates` SET `status_member_id`=0 WHERE `status_member_id` IS NULL; UPDATE `core_member_status_updates` SET `status_date`=0 WHERE `status_date` IS NULL; UPDATE `core_member_status_updates` SET `status_replies`=0 WHERE `status_replies` IS NULL; UPDATE `core_member_status_updates` SET `status_is_latest`=0 WHERE `status_is_latest` IS NULL; UPDATE `core_member_status_updates` SET `status_is_locked`=0 WHERE `status_is_locked` IS NULL; UPDATE `core_member_status_updates` SET `status_imported`=0 WHERE `status_imported` IS NULL; UPDATE `core_member_status_updates` SET `status_author_id`=0 WHERE `status_author_id` IS NULL; UPDATE `core_member_status_updates` SET `status_approved`=1 WHERE `status_approved` IS NULL; ALTER TABLE `core_member_status_updates` CHANGE COLUMN `status_id` `status_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `status_member_id` `status_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `status_date` `status_date` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `status_replies` `status_replies` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `status_is_latest` `status_is_latest` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `status_is_locked` `status_is_locked` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `status_imported` `status_imported` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `status_author_id` `status_author_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `status_approved` `status_approved` INT (1) NOT NULL DEFAULT 1 ; UPDATE `core_member_status_replies` SET `reply_id`='' WHERE `reply_id` IS NULL; UPDATE `core_member_status_replies` SET `reply_status_id`=0 WHERE `reply_status_id` IS NULL; UPDATE `core_member_status_replies` SET `reply_member_id`=0 WHERE `reply_member_id` IS NULL; UPDATE `core_member_status_replies` SET `reply_date`=0 WHERE `reply_date` IS NULL; ALTER TABLE `core_member_status_replies` CHANGE COLUMN `reply_id` `reply_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `reply_status_id` `reply_status_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `reply_member_id` `reply_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `reply_date` `reply_date` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_sys_social_groups` SET `group_id`='' WHERE `group_id` IS NULL; ALTER TABLE `core_sys_social_groups` CHANGE COLUMN `group_id` `group_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `owner_id` `owner_id` BIGINT (20) UNSIGNED NULL ; UPDATE `core_sys_social_group_members` SET `group_id`='' WHERE `group_id` IS NULL; ALTER TABLE `core_sys_social_group_members` CHANGE COLUMN `group_id` `group_id` BIGINT (20) UNSIGNED NOT NULL , CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NULL ; UPDATE `core_queue` SET `id`='' WHERE `id` IS NULL; UPDATE `core_queue` SET `offset`=0 WHERE `offset` IS NULL; UPDATE `core_queue` SET `date`=0 WHERE `date` IS NULL; UPDATE `core_queue` SET `priority`=5 WHERE `priority` IS NULL; ALTER TABLE `core_queue` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `offset` `offset` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `date` `date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `priority` `priority` TINYINT (1) UNSIGNED NOT NULL DEFAULT 5 COMMENT 'Order to run. Values 1 to 5 are allowed, 1 being highest priority.'; UPDATE `core_soft_delete_log` SET `sdl_id`='' WHERE `sdl_id` IS NULL; UPDATE `core_soft_delete_log` SET `sdl_obj_id`=0 WHERE `sdl_obj_id` IS NULL; UPDATE `core_soft_delete_log` SET `sdl_obj_member_id`=0 WHERE `sdl_obj_member_id` IS NULL; UPDATE `core_soft_delete_log` SET `sdl_obj_date`=0 WHERE `sdl_obj_date` IS NULL; UPDATE `core_soft_delete_log` SET `sdl_locked`=0 WHERE `sdl_locked` IS NULL; ALTER TABLE `core_soft_delete_log` CHANGE COLUMN `sdl_id` `sdl_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `sdl_obj_id` `sdl_obj_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `sdl_obj_member_id` `sdl_obj_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `sdl_obj_date` `sdl_obj_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `sdl_locked` `sdl_locked` INT (1) NOT NULL DEFAULT 0 ; UPDATE `core_widget_areas` SET `id`='' WHERE `id` IS NULL; ALTER TABLE `core_widget_areas` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number'; UPDATE `core_search_index` SET `index_id`='' WHERE `index_id` IS NULL; UPDATE `core_search_index` SET `index_object_id`=0 WHERE `index_object_id` IS NULL; UPDATE `core_search_index` SET `index_item_id`=0 WHERE `index_item_id` IS NULL; UPDATE `core_search_index` SET `index_container_id`=0 WHERE `index_container_id` IS NULL; UPDATE `core_search_index` SET `index_date_created`=0 WHERE `index_date_created` IS NULL; UPDATE `core_search_index` SET `index_author`=0 WHERE `index_author` IS NULL; CREATE TABLE `core_search_index_new` LIKE `core_search_index`; ALTER TABLE `core_search_index_new` CHANGE COLUMN `index_id` `index_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Primary key', DROP INDEX `object`, DROP INDEX `index_class_and_object_id`, CHANGE COLUMN `index_object_id` `index_object_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The ID of the object. pid for posts, tid for topics etc', ADD UNIQUE KEY `object` (`index_class`(181),`index_object_id`), ADD KEY `index_class_and_object_id` (`index_class`(181),`index_object_id`), DROP INDEX `item`, DROP INDEX `index_stream`, CHANGE COLUMN `index_item_id` `index_item_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'For comments and reviews, the ID of the item it pertains to. For \\IPS\\Content\\Item this would just be NULL', ADD KEY `item` (`index_class`(181),`index_item_id`), ADD KEY `index_stream` (`index_class`(161),`index_item_id`,`index_date_commented`,`index_date_updated`), DROP INDEX `container`, CHANGE COLUMN `index_container_id` `index_container_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The id of the container for items/comments/reviews', ADD KEY `container` (`index_class`(171),`index_container_id`,`index_date_commented`), CHANGE COLUMN `index_date_created` `index_date_created` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The object creation date', DROP INDEX `author_lookup`, CHANGE COLUMN `index_author` `index_author` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The object author id', ADD KEY `author_lookup` (`index_author`,`index_class`(150),`index_hidden`,`index_date_updated`,`index_date_commented`), CHANGE COLUMN `index_date_updated` `index_date_updated` INT (10) UNSIGNED NULL COMMENT 'Object last updated date', CHANGE COLUMN `index_item_index_id` `index_item_index_id` BIGINT (20) UNSIGNED NULL COMMENT 'The index ID of the item', CHANGE COLUMN `index_item_author` `index_item_author` BIGINT (20) UNSIGNED NULL COMMENT 'The author of the item', CHANGE COLUMN `index_club_id` `index_club_id` BIGINT (20) UNSIGNED NULL COMMENT 'The club ID, or NULL if it does not belong to a club', CHANGE COLUMN `index_date_commented` `index_date_commented` INT (10) UNSIGNED NULL COMMENT 'Object last commented/reviewed date'; INSERT IGNORE INTO `core_search_index_new` SELECT * FROM `core_search_index`; DROP TABLE `core_search_index`; RENAME TABLE `core_search_index_new` TO `core_search_index`; ALTER TABLE `core_widget_trash` CHANGE COLUMN `date` `date` INT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Date trash was added'; UPDATE `core_file_logs` SET `log_id`='' WHERE `log_id` IS NULL; UPDATE `core_file_logs` SET `log_configuration_id`=0 WHERE `log_configuration_id` IS NULL; UPDATE `core_file_logs` SET `log_date`=0 WHERE `log_date` IS NULL; ALTER TABLE `core_file_logs` CHANGE COLUMN `log_id` `log_id` BIGINT (20) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `log_configuration_id` `log_configuration_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `log_date` `log_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_sitemap` SET `updated`=0 WHERE `updated` IS NULL; UPDATE `core_sitemap` SET `last_id`=0 WHERE `last_id` IS NULL; ALTER TABLE `core_sitemap` CHANGE COLUMN `updated` `updated` INT (10) NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of last update', CHANGE COLUMN `last_id` `last_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Stores the last ID included in this sitemap'; UPDATE `core_acp_tab_order` SET `id`=0 WHERE `id` IS NULL; ALTER TABLE `core_acp_tab_order` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ID Number'; UPDATE `core_cache` SET `cache_expire`='' WHERE `cache_expire` IS NULL; ALTER TABLE `core_cache` CHANGE COLUMN `cache_expire` `cache_expire` INT (10) NOT NULL COMMENT 'Unix timestamp of when the cache expires'; UPDATE `core_menu` SET `id`='' WHERE `id` IS NULL; UPDATE `core_menu` SET `position`=1 WHERE `position` IS NULL; UPDATE `core_menu` SET `is_menu_child`=0 WHERE `is_menu_child` IS NULL; ALTER TABLE `core_menu` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `position` `position` INT (10) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'This item\'s position within the bar', CHANGE COLUMN `parent` `parent` INT (10) UNSIGNED NULL COMMENT 'The ID of the parent item if this is on the second bar, or NULL if the first bar', CHANGE COLUMN `is_menu_child` `is_menu_child` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'If this item is a child of a dropdown menu'; UPDATE `core_streams` SET `id`='' WHERE `id` IS NULL; UPDATE `core_streams` SET `position`=0 WHERE `position` IS NULL; UPDATE `core_streams` SET `default`=0 WHERE `default` IS NULL; UPDATE `core_streams` SET `unread_links`=0 WHERE `unread_links` IS NULL; ALTER TABLE `core_streams` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `date_start` `date_start` INT (10) NULL COMMENT 'If using a custom date, the start date', CHANGE COLUMN `date_end` `date_end` INT (10) NULL COMMENT 'If using a custom date, the end date', CHANGE COLUMN `position` `position` INT (10) NOT NULL DEFAULT 0 COMMENT 'The position in the list', CHANGE COLUMN `member` `member` BIGINT (20) NULL COMMENT 'The member who created the stream or null for a global stream', CHANGE COLUMN `date_relative_days` `date_relative_days` INT (10) UNSIGNED NULL COMMENT 'If using a relative date period, the number of days', CHANGE COLUMN `default` `default` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Default item shows to the right of the top breadcrumb navigation', CHANGE COLUMN `unread_links` `unread_links` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Should a item link take you to the first unread item?'; ALTER TABLE `core_view_updates` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NULL COMMENT 'The ID number for the object'; UPDATE `core_image_proxy` SET `cache_time`='' WHERE `cache_time` IS NULL; ALTER TABLE `core_image_proxy` CHANGE COLUMN `cache_time` `cache_time` INT (10) UNSIGNED NOT NULL COMMENT 'Timestamp of when the image was cached'; UPDATE `core_geoip_cache` SET `date`='' WHERE `date` IS NULL; ALTER TABLE `core_geoip_cache` CHANGE COLUMN `date` `date` INT (10) NOT NULL COMMENT 'Unix timestamp of when the data was retrieved '; UPDATE `core_api_logs` SET `id`='' WHERE `id` IS NULL; UPDATE `core_api_logs` SET `date`='' WHERE `date` IS NULL; UPDATE `core_api_logs` SET `is_bad_key`=0 WHERE `is_bad_key` IS NULL; ALTER TABLE `core_api_logs` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `date` `date` INT (10) NOT NULL COMMENT 'Timestamp of when request was made', CHANGE COLUMN `is_bad_key` `is_bad_key` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'If this log is for a request with a bad key - used to prevent brute force ', CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NULL COMMENT 'The authorized use\'s member ID, if applicable'; UPDATE `core_search_index_tags` SET `index_id`=0 WHERE `index_id` IS NULL; UPDATE `core_search_index_tags` SET `index_is_prefix`=0 WHERE `index_is_prefix` IS NULL; ALTER TABLE `core_search_index_tags` CHANGE COLUMN `index_id` `index_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Related rows index ID from core_search_index', CHANGE COLUMN `index_is_prefix` `index_is_prefix` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Signifies if this tag is the item prefix'; UPDATE `core_log` SET `id`='' WHERE `id` IS NULL; UPDATE `core_log` SET `time`=0 WHERE `time` IS NULL; UPDATE `core_log` SET `member_id`=0 WHERE `member_id` IS NULL; ALTER TABLE `core_log` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `exception_code` `exception_code` INT (3) UNSIGNED NULL COMMENT 'If the log was an exception, the code', CHANGE COLUMN `time` `time` INT (10) NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of log', CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Member that triggered the error, if any'; UPDATE `core_search_index_item_map` SET `index_author_id`=0 WHERE `index_author_id` IS NULL; UPDATE `core_search_index_item_map` SET `index_item_id`=0 WHERE `index_item_id` IS NULL; ALTER TABLE `core_search_index_item_map` CHANGE COLUMN `index_author_id` `index_author_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `index_item_id` `index_item_id` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_security_questions` SET `question_id`='' WHERE `question_id` IS NULL; ALTER TABLE `core_security_questions` CHANGE COLUMN `question_id` `question_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `question_order` `question_order` INT (10) NULL COMMENT 'Index for ordering questions'; UPDATE `core_security_answers` SET `answer_question_id`='' WHERE `answer_question_id` IS NULL; UPDATE `core_security_answers` SET `answer_member_id`='' WHERE `answer_member_id` IS NULL; UPDATE `core_security_answers` SET `answer_is_chosen`=0 WHERE `answer_is_chosen` IS NULL; ALTER TABLE `core_security_answers` CHANGE COLUMN `answer_question_id` `answer_question_id` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The ID number of the question this is an answer for', CHANGE COLUMN `answer_member_id` `answer_member_id` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The member ID this answer is for', CHANGE COLUMN `answer_is_chosen` `answer_is_chosen` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'When the authentication form is chosen, one answer is remembered with this flag so that refreshing produces the same question'; UPDATE `core_rss_export` SET `rss_id`='' WHERE `rss_id` IS NULL; UPDATE `core_rss_export` SET `rss_position`=0 WHERE `rss_position` IS NULL; ALTER TABLE `core_rss_export` CHANGE COLUMN `rss_id` `rss_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `rss_count` `rss_count` INT (10) NULL , CHANGE COLUMN `rss_position` `rss_position` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_reputation_leaderboard_history` SET `leader_date`=0 WHERE `leader_date` IS NULL; UPDATE `core_reputation_leaderboard_history` SET `leader_member_id`=0 WHERE `leader_member_id` IS NULL; UPDATE `core_reputation_leaderboard_history` SET `leader_position`=0 WHERE `leader_position` IS NULL; UPDATE `core_reputation_leaderboard_history` SET `leader_rep_total`=0 WHERE `leader_rep_total` IS NULL; ALTER TABLE `core_reputation_leaderboard_history` CHANGE COLUMN `leader_date` `leader_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `leader_member_id` `leader_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `leader_position` `leader_position` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `leader_rep_total` `leader_rep_total` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_googleauth_used_codes` SET `member`='' WHERE `member` IS NULL; UPDATE `core_googleauth_used_codes` SET `time`='' WHERE `time` IS NULL; ALTER TABLE `core_googleauth_used_codes` CHANGE COLUMN `member` `member` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The member ID the code was generated for', CHANGE COLUMN `time` `time` INT (10) UNSIGNED NOT NULL COMMENT 'Unix timestamp the code was generated'; UPDATE `core_clubs` SET `id`='' WHERE `id` IS NULL; UPDATE `core_clubs` SET `created`='' WHERE `created` IS NULL; UPDATE `core_clubs` SET `members`=0 WHERE `members` IS NULL; UPDATE `core_clubs` SET `featured`=0 WHERE `featured` IS NULL; UPDATE `core_clubs` SET `content`=0 WHERE `content` IS NULL; UPDATE `core_clubs` SET `approved`=0 WHERE `approved` IS NULL; ALTER TABLE `core_clubs` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `created` `created` INT (10) UNSIGNED NOT NULL COMMENT 'Unix timestamp of when the club was created', CHANGE COLUMN `members` `members` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Current number of members', CHANGE COLUMN `owner` `owner` BIGINT (20) UNSIGNED NULL COMMENT 'Member ID of club owner', CHANGE COLUMN `cover_offset` `cover_offset` INT (10) UNSIGNED NULL COMMENT 'The position offset for the cover photo', CHANGE COLUMN `featured` `featured` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Binary value indicating if club is featured', CHANGE COLUMN `last_activity` `last_activity` INT (10) UNSIGNED NULL COMMENT 'Timestamp of last activity', CHANGE COLUMN `content` `content` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Count of all content items + comments', CHANGE COLUMN `rebuilt` `rebuilt` INT (10) UNSIGNED NULL COMMENT 'Timestamp of when the last_activity and content values were last updated', CHANGE COLUMN `approved` `approved` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Boolean indicating if club is approved', CHANGE COLUMN `renewal_term` `renewal_term` INT (5) UNSIGNED NULL COMMENT 'The renewal term in renewal_units (e.g. if renews every 5 days, value will be 5)'; UPDATE `core_clubs_memberships` SET `club_id`='' WHERE `club_id` IS NULL; UPDATE `core_clubs_memberships` SET `member_id`='' WHERE `member_id` IS NULL; UPDATE `core_clubs_memberships` SET `joined`='' WHERE `joined` IS NULL; ALTER TABLE `core_clubs_memberships` CHANGE COLUMN `club_id` `club_id` BIGINT (20) UNSIGNED NOT NULL COMMENT 'Club ID Number', CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL COMMENT 'Member ID number', CHANGE COLUMN `joined` `joined` INT (10) UNSIGNED NOT NULL COMMENT 'Unix timestamp of when the member joined the club', CHANGE COLUMN `added_by` `added_by` BIGINT (20) UNSIGNED NULL COMMENT 'If added by a leader, the leader\'s member ID. NULL if joined themselves.', CHANGE COLUMN `invited_by` `invited_by` BIGINT (20) UNSIGNED NULL COMMENT 'If invited by another member, the member id. NULL if joined themselves.'; UPDATE `core_clubs_node_map` SET `id`='' WHERE `id` IS NULL; UPDATE `core_clubs_node_map` SET `club_id`=0 WHERE `club_id` IS NULL; UPDATE `core_clubs_node_map` SET `node_id`=0 WHERE `node_id` IS NULL; ALTER TABLE `core_clubs_node_map` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Primary ID', CHANGE COLUMN `club_id` `club_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The club ID', DROP INDEX `node`, CHANGE COLUMN `node_id` `node_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The ID number for the node', ADD KEY `node` (`node_class`(171),`node_id`); UPDATE `core_clubs_fields` SET `f_id`='' WHERE `f_id` IS NULL; UPDATE `core_clubs_fields` SET `f_required`=0 WHERE `f_required` IS NULL; UPDATE `core_clubs_fields` SET `f_filterable`=1 WHERE `f_filterable` IS NULL; UPDATE `core_clubs_fields` SET `f_allow_attachments`=1 WHERE `f_allow_attachments` IS NULL; ALTER TABLE `core_clubs_fields` CHANGE COLUMN `f_id` `f_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `f_position` `f_position` INT (10) UNSIGNED NULL COMMENT 'Position order', CHANGE COLUMN `f_required` `f_required` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Binary value indicating if the field is required', CHANGE COLUMN `f_multiple` `f_multiple` TINYINT (1) UNSIGNED NULL COMMENT 'For certain types of fields, if multiple values are supported', CHANGE COLUMN `f_filterable` `f_filterable` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Binary value indicating if the field should be included in the filter options', CHANGE COLUMN `f_allow_attachments` `f_allow_attachments` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 ; UPDATE `core_clubs_fieldvalues` SET `club_id`='' WHERE `club_id` IS NULL; ALTER TABLE `core_clubs_fieldvalues` CHANGE COLUMN `club_id` `club_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Club ID Number'; UPDATE `core_deletion_log` SET `dellog_id`='' WHERE `dellog_id` IS NULL; UPDATE `core_deletion_log` SET `dellog_content_id`=0 WHERE `dellog_content_id` IS NULL; UPDATE `core_deletion_log` SET `dellog_deleted_date`=0 WHERE `dellog_deleted_date` IS NULL; UPDATE `core_deletion_log` SET `dellog_content_container_id`=0 WHERE `dellog_content_container_id` IS NULL; ALTER TABLE `core_deletion_log` CHANGE COLUMN `dellog_id` `dellog_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', DROP INDEX `dellog_content`, CHANGE COLUMN `dellog_content_id` `dellog_content_id` BIGINT (20) NOT NULL DEFAULT 0 , ADD KEY `dellog_content` (`dellog_content_class`(171),`dellog_content_id`), CHANGE COLUMN `dellog_deleted_by` `dellog_deleted_by` BIGINT (20) NULL , CHANGE COLUMN `dellog_deleted_date` `dellog_deleted_date` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `dellog_content_container_id` `dellog_content_container_id` BIGINT (20) NOT NULL DEFAULT 0 ; UPDATE `core_content_meta` SET `meta_id`='' WHERE `meta_id` IS NULL; ALTER TABLE `core_content_meta` CHANGE COLUMN `meta_id` `meta_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', DROP INDEX `meta_content`, CHANGE COLUMN `meta_item_id` `meta_item_id` BIGINT (20) NULL COMMENT 'The Item Primary ID', ADD KEY `meta_content` (`meta_class`(171),`meta_item_id`); UPDATE `core_member_history` SET `log_id`='' WHERE `log_id` IS NULL; UPDATE `core_member_history` SET `log_member`=0 WHERE `log_member` IS NULL; ALTER TABLE `core_member_history` CHANGE COLUMN `log_id` `log_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `log_member` `log_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Member ID', CHANGE COLUMN `log_by` `log_by` BIGINT (20) UNSIGNED NULL COMMENT 'Action performed by'; UPDATE `core_members_known_devices` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `core_members_known_devices` SET `last_seen`=0 WHERE `last_seen` IS NULL; UPDATE `core_members_known_devices` SET `anonymous`=0 WHERE `anonymous` IS NULL; ALTER TABLE `core_members_known_devices` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The member ID authenticated on the device', CHANGE COLUMN `last_seen` `last_seen` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'A unix timestamp of when the device was last used. Updated at session start, not on every click', CHANGE COLUMN `anonymous` `anonymous` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Binary value indicating if, when the user is automatically logged in, their session should be anonymous'; UPDATE `core_members_known_ip_addresses` SET `member_id`='' WHERE `member_id` IS NULL; UPDATE `core_members_known_ip_addresses` SET `last_seen`='' WHERE `last_seen` IS NULL; ALTER TABLE `core_members_known_ip_addresses` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The member ID', CHANGE COLUMN `last_seen` `last_seen` INT (10) UNSIGNED NOT NULL COMMENT 'A unix timestamp of when the device was last used on this IP address. Updated at session start, not on every click'; UPDATE `core_statistics` SET `id`='' WHERE `id` IS NULL; UPDATE `core_statistics` SET `value_1`=0 WHERE `value_1` IS NULL; UPDATE `core_statistics` SET `value_2`=0 WHERE `value_2` IS NULL; UPDATE `core_statistics` SET `value_3`=0 WHERE `value_3` IS NULL; UPDATE `core_statistics` SET `time`=0 WHERE `time` IS NULL; ALTER TABLE `core_statistics` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', DROP INDEX `type_int_value`, CHANGE COLUMN `value_1` `value_1` BIGINT (20) NOT NULL DEFAULT 0 , ADD KEY `type_int_value` (`type`(161),`time`,`value_1`), CHANGE COLUMN `value_2` `value_2` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `value_3` `value_3` BIGINT (20) NOT NULL DEFAULT 0 , DROP INDEX `type_text_value`, CHANGE COLUMN `time` `time` INT (10) UNSIGNED NOT NULL DEFAULT 0 , ADD KEY `type_text_value` (`type`(90),`time`,`value_4`(90)); UPDATE `core_reactions` SET `reaction_id`='' WHERE `reaction_id` IS NULL; ALTER TABLE `core_reactions` CHANGE COLUMN `reaction_id` `reaction_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `reaction_position` `reaction_position` INT (10) NULL ; UPDATE `core_social_promote` SET `promote_id`='' WHERE `promote_id` IS NULL; UPDATE `core_social_promote` SET `promote_class_id`=0 WHERE `promote_class_id` IS NULL; UPDATE `core_social_promote` SET `promote_added`=0 WHERE `promote_added` IS NULL; UPDATE `core_social_promote` SET `promote_scheduled`=0 WHERE `promote_scheduled` IS NULL; UPDATE `core_social_promote` SET `promote_sent`=0 WHERE `promote_sent` IS NULL; UPDATE `core_social_promote` SET `promote_added_by`=0 WHERE `promote_added_by` IS NULL; UPDATE `core_social_promote` SET `promote_schedule_auto`=0 WHERE `promote_schedule_auto` IS NULL; UPDATE `core_social_promote` SET `promote_failed`=0 WHERE `promote_failed` IS NULL; UPDATE `core_social_promote` SET `promote_internal`=0 WHERE `promote_internal` IS NULL; ALTER TABLE `core_social_promote` CHANGE COLUMN `promote_id` `promote_id` BIGINT (20) NOT NULL AUTO_INCREMENT , DROP INDEX `promote_lookup`, CHANGE COLUMN `promote_class_id` `promote_class_id` INT (10) NOT NULL DEFAULT 0 COMMENT 'The main ID for the content item/comment', ADD KEY `promote_lookup` (`promote_class`(180),`promote_class_id`,`promote_internal`), CHANGE COLUMN `promote_added` `promote_added` INT (10) NOT NULL DEFAULT 0 COMMENT 'The date the item was authored or last edited', CHANGE COLUMN `promote_scheduled` `promote_scheduled` INT (10) NOT NULL DEFAULT 0 COMMENT 'The date the item is to be sent out', CHANGE COLUMN `promote_sent` `promote_sent` INT (10) NOT NULL DEFAULT 0 COMMENT 'The date the item was sent out', CHANGE COLUMN `promote_added_by` `promote_added_by` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `promote_schedule_auto` `promote_schedule_auto` INT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'A flag to note if this has been auto scheduled (1) or manually scheduled (0)', CHANGE COLUMN `promote_failed` `promote_failed` INT (2) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The number of times this has failed to send', CHANGE COLUMN `promote_internal` `promote_internal` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Has this been shared internally?', CHANGE COLUMN `promote_hide` `promote_hide` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Allows rows to not be shown in our picks'; UPDATE `core_social_promote_sharers` SET `sharer_id`='' WHERE `sharer_id` IS NULL; ALTER TABLE `core_social_promote_sharers` CHANGE COLUMN `sharer_id` `sharer_id` INT (10) NOT NULL AUTO_INCREMENT ; UPDATE `core_social_promote_content` SET `response_id`='' WHERE `response_id` IS NULL; UPDATE `core_social_promote_content` SET `response_promote_id`=0 WHERE `response_promote_id` IS NULL; UPDATE `core_social_promote_content` SET `response_failed`=0 WHERE `response_failed` IS NULL; UPDATE `core_social_promote_content` SET `response_date`=0 WHERE `response_date` IS NULL; ALTER TABLE `core_social_promote_content` CHANGE COLUMN `response_id` `response_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `response_promote_id` `response_promote_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `response_failed` `response_failed` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `response_date` `response_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `response_sent_date` `response_sent_date` INT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Timestamp of when sent was triggered as this will vary from actual response time'; UPDATE `core_group_promotions` SET `promote_id`='' WHERE `promote_id` IS NULL; UPDATE `core_group_promotions` SET `promote_position`=0 WHERE `promote_position` IS NULL; ALTER TABLE `core_group_promotions` CHANGE COLUMN `promote_id` `promote_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `promote_position` `promote_position` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Position of promotion rule'; UPDATE `core_profile_steps` SET `step_id`='' WHERE `step_id` IS NULL; UPDATE `core_profile_steps` SET `step_position`=0 WHERE `step_position` IS NULL; ALTER TABLE `core_profile_steps` CHANGE COLUMN `step_id` `step_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `step_position` `step_position` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_oauth_clients` SET `oauth_use_refresh_tokens`='' WHERE `oauth_use_refresh_tokens` IS NULL; UPDATE `core_oauth_clients` SET `oauth_enabled`=1 WHERE `oauth_enabled` IS NULL; UPDATE `core_oauth_clients` SET `oauth_ucp`=1 WHERE `oauth_ucp` IS NULL; ALTER TABLE `core_oauth_clients` CHANGE COLUMN `oauth_access_token_length` `oauth_access_token_length` INT (10) UNSIGNED NULL COMMENT 'Number of hours access token lives for, or NULL for no limit', CHANGE COLUMN `oauth_use_refresh_tokens` `oauth_use_refresh_tokens` TINYINT (1) UNSIGNED NOT NULL COMMENT 'Boolean value indicating if refresh tokens should be used', CHANGE COLUMN `oauth_refresh_token_length` `oauth_refresh_token_length` INT (10) UNSIGNED NULL COMMENT 'Number of days refresh tokens live for, or NULL for no expiry or not applicable', CHANGE COLUMN `oauth_enabled` `oauth_enabled` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Boolean value indicating if client is enabled', CHANGE COLUMN `oauth_choose_scopes` `oauth_choose_scopes` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Boolean value indicating if user can choose which of the requested scopes to grant', CHANGE COLUMN `oauth_ucp` `oauth_ucp` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Boolean value indicating if the user can see and revoke their authorization in their settings page'; UPDATE `core_oauth_server_access_tokens` SET `issued`='' WHERE `issued` IS NULL; ALTER TABLE `core_oauth_server_access_tokens` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NULL COMMENT 'The member ID or NULL for client_credentials', CHANGE COLUMN `access_token_expires` `access_token_expires` INT (10) UNSIGNED NULL COMMENT 'Unix timestamp of when access token expires, or NULL for never', CHANGE COLUMN `refresh_token_expires` `refresh_token_expires` INT (10) UNSIGNED NULL COMMENT 'Unix timestamp of when refresh token expires or NULL if never - will be same value as access_token_expires if not applicable', CHANGE COLUMN `issued` `issued` INT (10) UNSIGNED NOT NULL COMMENT 'Unix timestamp of when access token was generated'; UPDATE `core_oauth_server_authorization_codes` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `core_oauth_server_authorization_codes` SET `expires`=0 WHERE `expires` IS NULL; UPDATE `core_oauth_server_authorization_codes` SET `used`=0 WHERE `used` IS NULL; ALTER TABLE `core_oauth_server_authorization_codes` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The member ID', CHANGE COLUMN `expires` `expires` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of expiration', CHANGE COLUMN `used` `used` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Boolean value indicating if code has been used'; UPDATE `core_login_methods` SET `login_id`='' WHERE `login_id` IS NULL; UPDATE `core_login_methods` SET `login_order`='' WHERE `login_order` IS NULL; UPDATE `core_login_methods` SET `login_acp`=1 WHERE `login_acp` IS NULL; UPDATE `core_login_methods` SET `login_enabled`=1 WHERE `login_enabled` IS NULL; UPDATE `core_login_methods` SET `login_register`=1 WHERE `login_register` IS NULL; ALTER TABLE `core_login_methods` CHANGE COLUMN `login_id` `login_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `login_order` `login_order` INT (10) UNSIGNED NOT NULL COMMENT 'The order to process in ', CHANGE COLUMN `login_acp` `login_acp` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Boolean value indicating if method can be used for ACP logins', CHANGE COLUMN `login_enabled` `login_enabled` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Boolean value indicating if method is enabled', CHANGE COLUMN `login_register` `login_register` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Boolean value indicating if users can register using this method'; UPDATE `core_login_links` SET `token_login_method`=0 WHERE `token_login_method` IS NULL; UPDATE `core_login_links` SET `token_member`=0 WHERE `token_member` IS NULL; UPDATE `core_login_links` SET `token_linked`=0 WHERE `token_linked` IS NULL; CREATE TABLE `core_login_links_new` LIKE `core_login_links`; ALTER TABLE `core_login_links_new` DROP INDEX `token_identifier`, CHANGE COLUMN `token_login_method` `token_login_method` BIGINT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The ID number of the login method', ADD UNIQUE KEY `token_identifier` (`token_login_method`,`token_identifier`(181)), CHANGE COLUMN `token_member` `token_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The member ID', CHANGE COLUMN `token_linked` `token_linked` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Boolean value indicating if the account has been successfully linked', CHANGE COLUMN `token_expires` `token_expires` INT (10) UNSIGNED NULL COMMENT 'Unix timestamp of when the access token expires'; INSERT IGNORE INTO `core_login_links_new` SELECT * FROM `core_login_links`; DROP TABLE `core_login_links`; RENAME TABLE `core_login_links_new` TO `core_login_links`; UPDATE `core_members_feature_seen` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `core_members_feature_seen` SET `feature_id`=0 WHERE `feature_id` IS NULL; ALTER TABLE `core_members_feature_seen` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Member ID', CHANGE COLUMN `feature_id` `feature_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `core_spam_whitelist` SET `whitelist_id`='' WHERE `whitelist_id` IS NULL; UPDATE `core_spam_whitelist` SET `whitelist_date`=0 WHERE `whitelist_date` IS NULL; ALTER TABLE `core_spam_whitelist` CHANGE COLUMN `whitelist_id` `whitelist_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `whitelist_date` `whitelist_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_automatic_moderation_rules` SET `rule_id`='' WHERE `rule_id` IS NULL; UPDATE `core_automatic_moderation_rules` SET `rule_points_needed`=0 WHERE `rule_points_needed` IS NULL; UPDATE `core_automatic_moderation_rules` SET `rule_position`=0 WHERE `rule_position` IS NULL; UPDATE `core_automatic_moderation_rules` SET `rule_enabled`=1 WHERE `rule_enabled` IS NULL; ALTER TABLE `core_automatic_moderation_rules` CHANGE COLUMN `rule_id` `rule_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `rule_points_needed` `rule_points_needed` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `rule_position` `rule_position` INT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `rule_enabled` `rule_enabled` INT (1) NOT NULL DEFAULT 1 ; UPDATE `core_automatic_moderation_pending` SET `pending_object_id`=0 WHERE `pending_object_id` IS NULL; UPDATE `core_automatic_moderation_pending` SET `pending_report_id`=0 WHERE `pending_report_id` IS NULL; UPDATE `core_automatic_moderation_pending` SET `pending_added`=0 WHERE `pending_added` IS NULL; UPDATE `core_automatic_moderation_pending` SET `pending_rule_id`=0 WHERE `pending_rule_id` IS NULL; ALTER TABLE `core_automatic_moderation_pending` CHANGE COLUMN `pending_object_id` `pending_object_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `pending_report_id` `pending_report_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `pending_added` `pending_added` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `pending_rule_id` `pending_rule_id` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_automatic_moderation_types` SET `type_id`='' WHERE `type_id` IS NULL; UPDATE `core_automatic_moderation_types` SET `type_position`=0 WHERE `type_position` IS NULL; ALTER TABLE `core_automatic_moderation_types` CHANGE COLUMN `type_id` `type_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `type_position` `type_position` INT (10) NOT NULL DEFAULT 0 ; UPDATE `core_saved_charts` SET `chart_id`='' WHERE `chart_id` IS NULL; ALTER TABLE `core_saved_charts` CHANGE COLUMN `chart_id` `chart_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `chart_member` `chart_member` BIGINT (20) UNSIGNED NULL ; UPDATE `core_oauth_authorize_prompts` SET `timestamp`='' WHERE `timestamp` IS NULL; UPDATE `core_oauth_authorize_prompts` SET `logged_in`=0 WHERE `logged_in` IS NULL; ALTER TABLE `core_oauth_authorize_prompts` CHANGE COLUMN `timestamp` `timestamp` INT (10) UNSIGNED NOT NULL COMMENT 'Unix timestamp of when this prompt was initially shown', CHANGE COLUMN `logged_in` `logged_in` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Has the user logged in yet (for prompts that require it)?'; UPDATE `core_profile_completion` SET `id`='' WHERE `id` IS NULL; UPDATE `core_profile_completion` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `core_profile_completion` SET `step_id`=0 WHERE `step_id` IS NULL; ALTER TABLE `core_profile_completion` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `member_id` `member_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `step_id` `step_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `completed` `completed` INT (11) NULL ; UPDATE `core_acp_notifications` SET `id`='' WHERE `id` IS NULL; UPDATE `core_acp_notifications` SET `sent`='' WHERE `sent` IS NULL; ALTER TABLE `core_acp_notifications` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `sent` `sent` INT (10) UNSIGNED NOT NULL COMMENT 'Unix timestamp of when this notification was sent'; UPDATE `core_acp_notifcations_dismissals` SET `notification`='' WHERE `notification` IS NULL; UPDATE `core_acp_notifcations_dismissals` SET `member`='' WHERE `member` IS NULL; UPDATE `core_acp_notifcations_dismissals` SET `time`='' WHERE `time` IS NULL; ALTER TABLE `core_acp_notifcations_dismissals` CHANGE COLUMN `notification` `notification` BIGINT (20) UNSIGNED NOT NULL COMMENT 'Notification ID Number', CHANGE COLUMN `member` `member` BIGINT (10) UNSIGNED NOT NULL COMMENT 'Member ID Number', CHANGE COLUMN `time` `time` INT (10) UNSIGNED NOT NULL COMMENT 'Unix timestamp of when the notification was dismissed'; UPDATE `core_acp_notifications_preferences` SET `member`=0 WHERE `member` IS NULL; UPDATE `core_acp_notifications_preferences` SET `view`=1 WHERE `view` IS NULL; ALTER TABLE `core_acp_notifications_preferences` CHANGE COLUMN `member` `member` BIGINT (10) NOT NULL DEFAULT 0 COMMENT 'Member ID Number', CHANGE COLUMN `view` `view` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Does the admin want to view this type of notification?'; UPDATE `core_ips_bulletins` SET `id`='' WHERE `id` IS NULL; UPDATE `core_ips_bulletins` SET `cached`='' WHERE `cached` IS NULL; ALTER TABLE `core_ips_bulletins` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `cached` `cached` INT (10) UNSIGNED NOT NULL COMMENT 'Unix timestamp of when this row was cached'; UPDATE `core_post_before_registering` SET `id`=0 WHERE `id` IS NULL; UPDATE `core_post_before_registering` SET `timestamp`=0 WHERE `timestamp` IS NULL; UPDATE `core_post_before_registering` SET `language`=0 WHERE `language` IS NULL; CREATE TABLE `core_post_before_registering_new` LIKE `core_post_before_registering`; ALTER TABLE `core_post_before_registering_new` DROP INDEX `content_lookup`, CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The ID of the content that was posted', ADD UNIQUE KEY `content_lookup` (`class`(171),`id`), CHANGE COLUMN `timestamp` `timestamp` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of when the content was posted', CHANGE COLUMN `member` `member` BIGINT (20) UNSIGNED NULL COMMENT 'The ID number of the member account once it has been created but before it has been validated', CHANGE COLUMN `followup` `followup` INT (10) UNSIGNED NULL COMMENT 'Unix timestamp of when followup email was sent', CHANGE COLUMN `language` `language` BIGINT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ID number of the language that the guest had selected'; INSERT IGNORE INTO `core_post_before_registering_new` SELECT * FROM `core_post_before_registering`; DROP TABLE `core_post_before_registering`; RENAME TABLE `core_post_before_registering_new` TO `core_post_before_registering`; UPDATE `core_output_cache` SET `cache_expire`=0 WHERE `cache_expire` IS NULL; ALTER TABLE `core_output_cache` CHANGE COLUMN `cache_expire` `cache_expire` INT (10) NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of when the cache expires'; UPDATE `forums_forums` SET `id`='' WHERE `id` IS NULL; UPDATE `forums_forums` SET `topics`=0 WHERE `topics` IS NULL; UPDATE `forums_forums` SET `posts`=0 WHERE `posts` IS NULL; UPDATE `forums_forums` SET `last_poster_id`=0 WHERE `last_poster_id` IS NULL; UPDATE `forums_forums` SET `redirect_hits`=0 WHERE `redirect_hits` IS NULL; UPDATE `forums_forums` SET `queued_topics`=0 WHERE `queued_topics` IS NULL; UPDATE `forums_forums` SET `queued_posts`=0 WHERE `queued_posts` IS NULL; UPDATE `forums_forums` SET `min_posts_post`=0 WHERE `min_posts_post` IS NULL; UPDATE `forums_forums` SET `min_posts_view`=0 WHERE `min_posts_view` IS NULL; UPDATE `forums_forums` SET `forums_bitoptions`=0 WHERE `forums_bitoptions` IS NULL; UPDATE `forums_forums` SET `disable_sharelinks`=0 WHERE `disable_sharelinks` IS NULL; UPDATE `forums_forums` SET `archived_topics`=0 WHERE `archived_topics` IS NULL; UPDATE `forums_forums` SET `archived_posts`=0 WHERE `archived_posts` IS NULL; ALTER TABLE `forums_forums` CHANGE COLUMN `id` `id` SMALLINT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `topics` `topics` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `posts` `posts` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `last_post` `last_post` INT (10) NULL , CHANGE COLUMN `last_poster_id` `last_poster_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `position` `position` INT (5) UNSIGNED NULL DEFAULT 0 , CHANGE COLUMN `last_id` `last_id` INT (10) NULL , CHANGE COLUMN `skin_id` `skin_id` INT (10) NULL , CHANGE COLUMN `parent_id` `parent_id` MEDIUMINT (5) NULL DEFAULT -1 , CHANGE COLUMN `redirect_hits` `redirect_hits` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `queued_topics` `queued_topics` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `queued_posts` `queued_posts` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `min_posts_post` `min_posts_post` INT (10) UNSIGNED NOT NULL DEFAULT 0 , DROP INDEX `widget_performance`, CHANGE COLUMN `min_posts_view` `min_posts_view` INT (10) UNSIGNED NOT NULL DEFAULT 0 , ADD KEY `widget_performance` (`min_posts_view`,`password`(20),`password_override`(160),`can_view_others`), CHANGE COLUMN `forums_bitoptions` `forums_bitoptions` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `disable_sharelinks` `disable_sharelinks` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `archived_topics` `archived_topics` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `archived_posts` `archived_posts` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `club_id` `club_id` BIGINT (20) UNSIGNED NULL COMMENT 'The club ID if this forum belongs to a club, or NULL'; UPDATE `forums_topics` SET `tid`='' WHERE `tid` IS NULL; UPDATE `forums_topics` SET `starter_id`=0 WHERE `starter_id` IS NULL; UPDATE `forums_topics` SET `last_poster_id`=0 WHERE `last_poster_id` IS NULL; UPDATE `forums_topics` SET `last_post`=0 WHERE `last_post` IS NULL; UPDATE `forums_topics` SET `forum_id`=0 WHERE `forum_id` IS NULL; UPDATE `forums_topics` SET `topic_firstpost`=0 WHERE `topic_firstpost` IS NULL; UPDATE `forums_topics` SET `topic_queuedposts`=0 WHERE `topic_queuedposts` IS NULL; UPDATE `forums_topics` SET `topic_open_time`=0 WHERE `topic_open_time` IS NULL; UPDATE `forums_topics` SET `topic_close_time`=0 WHERE `topic_close_time` IS NULL; UPDATE `forums_topics` SET `topic_rating_total`=0 WHERE `topic_rating_total` IS NULL; UPDATE `forums_topics` SET `topic_rating_hits`=0 WHERE `topic_rating_hits` IS NULL; UPDATE `forums_topics` SET `moved_on`=0 WHERE `moved_on` IS NULL; UPDATE `forums_topics` SET `topic_archive_status`=0 WHERE `topic_archive_status` IS NULL; UPDATE `forums_topics` SET `last_real_post`=0 WHERE `last_real_post` IS NULL; UPDATE `forums_topics` SET `topic_answered_pid`=0 WHERE `topic_answered_pid` IS NULL; ALTER TABLE `forums_topics` CHANGE COLUMN `tid` `tid` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `posts` `posts` INT (10) NULL , CHANGE COLUMN `starter_id` `starter_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `start_date` `start_date` INT (10) NULL , CHANGE COLUMN `last_poster_id` `last_poster_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `last_post` `last_post` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `last_vote` `last_vote` INT (10) NULL , CHANGE COLUMN `views` `views` INT (10) UNSIGNED NULL DEFAULT 0 , CHANGE COLUMN `forum_id` `forum_id` SMALLINT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `topic_firstpost` `topic_firstpost` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `topic_queuedposts` `topic_queuedposts` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `topic_open_time` `topic_open_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `topic_close_time` `topic_close_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `topic_rating_total` `topic_rating_total` SMALLINT (5) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `topic_rating_hits` `topic_rating_hits` SMALLINT (5) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `moved_on` `moved_on` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `topic_archive_status` `topic_archive_status` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `last_real_post` `last_real_post` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `topic_answered_pid` `topic_answered_pid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `popular_time` `popular_time` INT (10) NULL COMMENT 'Timestamp of when this topic will stop being popular.', CHANGE COLUMN `featured` `featured` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Topic is featured?', CHANGE COLUMN `question_rating` `question_rating` INT (10) NULL COMMENT 'If this topic is a question, it\'s current rating', CHANGE COLUMN `topic_hiddenposts` `topic_hiddenposts` INT (10) UNSIGNED NULL ; UPDATE `forums_posts` SET `pid`='' WHERE `pid` IS NULL; UPDATE `forums_posts` SET `author_id`=0 WHERE `author_id` IS NULL; UPDATE `forums_posts` SET `topic_id`=0 WHERE `topic_id` IS NULL; UPDATE `forums_posts` SET `post_htmlstate`=0 WHERE `post_htmlstate` IS NULL; UPDATE `forums_posts` SET `post_bwoptions`=0 WHERE `post_bwoptions` IS NULL; UPDATE `forums_posts` SET `pdelete_time`=0 WHERE `pdelete_time` IS NULL; ALTER TABLE `forums_posts` CHANGE COLUMN `pid` `pid` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `edit_time` `edit_time` INT (10) NULL , CHANGE COLUMN `author_id` `author_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `post_date` `post_date` INT (10) NULL , CHANGE COLUMN `topic_id` `topic_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `post_htmlstate` `post_htmlstate` SMALLINT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `post_bwoptions` `post_bwoptions` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `pdelete_time` `pdelete_time` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `post_field_int` `post_field_int` INT (10) NULL DEFAULT 0 ; UPDATE `forums_answer_ratings` SET `id`='' WHERE `id` IS NULL; UPDATE `forums_answer_ratings` SET `post`=0 WHERE `post` IS NULL; UPDATE `forums_answer_ratings` SET `member`=0 WHERE `member` IS NULL; UPDATE `forums_answer_ratings` SET `date`=0 WHERE `date` IS NULL; ALTER TABLE `forums_answer_ratings` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `post` `post` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The post ID', CHANGE COLUMN `member` `member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The member giving the rating', CHANGE COLUMN `date` `date` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of when the rating was given', CHANGE COLUMN `topic` `topic` INT (10) UNSIGNED NULL COMMENT 'The topic ID'; UPDATE `forums_question_ratings` SET `id`='' WHERE `id` IS NULL; UPDATE `forums_question_ratings` SET `topic`='' WHERE `topic` IS NULL; UPDATE `forums_question_ratings` SET `forum`='' WHERE `forum` IS NULL; UPDATE `forums_question_ratings` SET `date`='' WHERE `date` IS NULL; ALTER TABLE `forums_question_ratings` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `topic` `topic` INT (10) UNSIGNED NOT NULL COMMENT 'The topic ID', CHANGE COLUMN `forum` `forum` SMALLINT (5) UNSIGNED NOT NULL COMMENT 'The forum ID', CHANGE COLUMN `member` `member` BIGINT (20) UNSIGNED NULL COMMENT 'The member giving the rating', CHANGE COLUMN `date` `date` INT (10) UNSIGNED NOT NULL COMMENT 'Unix timestamp of when the rating was given'; UPDATE `forums_archive_rules` SET `archive_skip`=0 WHERE `archive_skip` IS NULL; ALTER TABLE `forums_archive_rules` CHANGE COLUMN `archive_skip` `archive_skip` INT (1) NOT NULL DEFAULT 0 ; UPDATE `forums_archive_posts` SET `archive_id`=0 WHERE `archive_id` IS NULL; UPDATE `forums_archive_posts` SET `archive_author_id`=0 WHERE `archive_author_id` IS NULL; UPDATE `forums_archive_posts` SET `archive_content_date`=0 WHERE `archive_content_date` IS NULL; UPDATE `forums_archive_posts` SET `archive_queued`=1 WHERE `archive_queued` IS NULL; UPDATE `forums_archive_posts` SET `archive_topic_id`=0 WHERE `archive_topic_id` IS NULL; UPDATE `forums_archive_posts` SET `archive_is_first`=0 WHERE `archive_is_first` IS NULL; UPDATE `forums_archive_posts` SET `archive_bwoptions`=0 WHERE `archive_bwoptions` IS NULL; UPDATE `forums_archive_posts` SET `archive_html_mode`=0 WHERE `archive_html_mode` IS NULL; UPDATE `forums_archive_posts` SET `archive_show_edited_by`=0 WHERE `archive_show_edited_by` IS NULL; UPDATE `forums_archive_posts` SET `archive_edit_time`=0 WHERE `archive_edit_time` IS NULL; UPDATE `forums_archive_posts` SET `archive_added`=0 WHERE `archive_added` IS NULL; UPDATE `forums_archive_posts` SET `archive_restored`=0 WHERE `archive_restored` IS NULL; UPDATE `forums_archive_posts` SET `archive_forum_id`=0 WHERE `archive_forum_id` IS NULL; ALTER TABLE `forums_archive_posts` CHANGE COLUMN `archive_id` `archive_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_author_id` `archive_author_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_content_date` `archive_content_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_queued` `archive_queued` INT (1) NOT NULL DEFAULT 1 , CHANGE COLUMN `archive_topic_id` `archive_topic_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_is_first` `archive_is_first` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_bwoptions` `archive_bwoptions` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_html_mode` `archive_html_mode` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_show_edited_by` `archive_show_edited_by` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_edit_time` `archive_edit_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_added` `archive_added` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_restored` `archive_restored` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_forum_id` `archive_forum_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `archive_field_int` `archive_field_int` INT (10) NULL ; UPDATE `forums_topic_mmod` SET `mm_id`='' WHERE `mm_id` IS NULL; UPDATE `forums_topic_mmod` SET `topic_move`=0 WHERE `topic_move` IS NULL; ALTER TABLE `forums_topic_mmod` CHANGE COLUMN `mm_id` `mm_id` SMALLINT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `topic_move` `topic_move` SMALLINT (5) NOT NULL DEFAULT 0 ; UPDATE `forums_rss_import` SET `rss_import_id`='' WHERE `rss_import_id` IS NULL; UPDATE `forums_rss_import` SET `rss_import_forum_id`=0 WHERE `rss_import_forum_id` IS NULL; UPDATE `forums_rss_import` SET `rss_import_mid`=0 WHERE `rss_import_mid` IS NULL; UPDATE `forums_rss_import` SET `rss_import_pergo`=0 WHERE `rss_import_pergo` IS NULL; UPDATE `forums_rss_import` SET `rss_import_time`=0 WHERE `rss_import_time` IS NULL; UPDATE `forums_rss_import` SET `rss_import_last_import`=0 WHERE `rss_import_last_import` IS NULL; UPDATE `forums_rss_import` SET `rss_import_auto_follow`=0 WHERE `rss_import_auto_follow` IS NULL; ALTER TABLE `forums_rss_import` CHANGE COLUMN `rss_import_id` `rss_import_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `rss_import_forum_id` `rss_import_forum_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `rss_import_mid` `rss_import_mid` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `rss_import_pergo` `rss_import_pergo` SMALLINT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `rss_import_time` `rss_import_time` SMALLINT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `rss_import_last_import` `rss_import_last_import` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `rss_import_auto_follow` `rss_import_auto_follow` TINYINT (4) NOT NULL DEFAULT 0 ; UPDATE `forums_rss_imported` SET `rss_imported_tid`=0 WHERE `rss_imported_tid` IS NULL; UPDATE `forums_rss_imported` SET `rss_imported_impid`=0 WHERE `rss_imported_impid` IS NULL; ALTER TABLE `forums_rss_imported` CHANGE COLUMN `rss_imported_tid` `rss_imported_tid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `rss_imported_impid` `rss_imported_impid` INT (10) NOT NULL DEFAULT 0 ; UPDATE `forums_view_method` SET `member_id`=0 WHERE `member_id` IS NULL; ALTER TABLE `forums_view_method` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `downloads_categories` SET `cid`='' WHERE `cid` IS NULL; UPDATE `downloads_categories` SET `cparent`=0 WHERE `cparent` IS NULL; UPDATE `downloads_categories` SET `cposition`=0 WHERE `cposition` IS NULL; UPDATE `downloads_categories` SET `cbitoptions`=0 WHERE `cbitoptions` IS NULL; UPDATE `downloads_categories` SET `clast_file_id`=0 WHERE `clast_file_id` IS NULL; UPDATE `downloads_categories` SET `clast_file_date`=0 WHERE `clast_file_date` IS NULL; ALTER TABLE `downloads_categories` CHANGE COLUMN `cid` `cid` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `cparent` `cparent` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `cposition` `cposition` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `cbitoptions` `cbitoptions` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Bitwise options', CHANGE COLUMN `cmaxfile` `cmaxfile` INT (10) UNSIGNED NULL DEFAULT 512000 COMMENT 'Maximum file size', CHANGE COLUMN `cmaxss` `cmaxss` INT (10) UNSIGNED NULL DEFAULT 512 COMMENT 'Maximum screenshot size', CHANGE COLUMN `cversioning` `cversioning` INT (10) UNSIGNED NULL COMMENT 'Number of versions of files to keep. 0 means disabled, NULL means keep all versions.', CHANGE COLUMN `clog` `clog` INT (10) UNSIGNED NULL COMMENT 'Number of days to keep download logs. 0 means disables, NULL means never delete logs.', CHANGE COLUMN `cforum_id` `cforum_id` SMALLINT (5) UNSIGNED NULL COMMENT 'IP.Board integration: forum ID', CHANGE COLUMN `clast_file_id` `clast_file_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Latest file ID in this category or any sub-category', CHANGE COLUMN `clast_file_date` `clast_file_date` INT (11) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Latest file date in this category or any sub-category', CHANGE COLUMN `cclub_id` `cclub_id` BIGINT (20) UNSIGNED NULL COMMENT 'The club ID if this category belongs to a club, or NULL'; UPDATE `downloads_cfields` SET `cf_id`='' WHERE `cf_id` IS NULL; UPDATE `downloads_cfields` SET `cf_max_input`=0 WHERE `cf_max_input` IS NULL; UPDATE `downloads_cfields` SET `cf_position`=0 WHERE `cf_position` IS NULL; UPDATE `downloads_cfields` SET `cf_multiple`=0 WHERE `cf_multiple` IS NULL; UPDATE `downloads_cfields` SET `cf_allow_attachments`=1 WHERE `cf_allow_attachments` IS NULL; ALTER TABLE `downloads_cfields` CHANGE COLUMN `cf_id` `cf_id` SMALLINT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `cf_max_input` `cf_max_input` SMALLINT (6) NOT NULL DEFAULT 0 , CHANGE COLUMN `cf_position` `cf_position` SMALLINT (6) NOT NULL DEFAULT 0 , CHANGE COLUMN `cf_multiple` `cf_multiple` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `cf_allow_attachments` `cf_allow_attachments` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 ; UPDATE `downloads_files` SET `file_id`='' WHERE `file_id` IS NULL; UPDATE `downloads_files` SET `file_cat`=0 WHERE `file_cat` IS NULL; UPDATE `downloads_files` SET `file_views`=0 WHERE `file_views` IS NULL; UPDATE `downloads_files` SET `file_downloads`=0 WHERE `file_downloads` IS NULL; UPDATE `downloads_files` SET `file_submitted`=0 WHERE `file_submitted` IS NULL; UPDATE `downloads_files` SET `file_updated`=0 WHERE `file_updated` IS NULL; UPDATE `downloads_files` SET `file_size`=0 WHERE `file_size` IS NULL; UPDATE `downloads_files` SET `file_submitter`=0 WHERE `file_submitter` IS NULL; UPDATE `downloads_files` SET `file_approver`=0 WHERE `file_approver` IS NULL; UPDATE `downloads_files` SET `file_approvedon`=0 WHERE `file_approvedon` IS NULL; UPDATE `downloads_files` SET `file_topicid`=0 WHERE `file_topicid` IS NULL; UPDATE `downloads_files` SET `file_pendcomments`=0 WHERE `file_pendcomments` IS NULL; UPDATE `downloads_files` SET `file_renewal_term`=0 WHERE `file_renewal_term` IS NULL; UPDATE `downloads_files` SET `file_comments`=0 WHERE `file_comments` IS NULL; UPDATE `downloads_files` SET `file_reviews`=0 WHERE `file_reviews` IS NULL; UPDATE `downloads_files` SET `file_locked`=0 WHERE `file_locked` IS NULL; ALTER TABLE `downloads_files` CHANGE COLUMN `file_id` `file_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `file_cat` `file_cat` MEDIUMINT (8) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_views` `file_views` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_downloads` `file_downloads` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_submitted` `file_submitted` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_updated` `file_updated` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_size` `file_size` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_submitter` `file_submitter` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `file_approver` `file_approver` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `file_approvedon` `file_approvedon` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_topicid` `file_topicid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_pendcomments` `file_pendcomments` SMALLINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_renewal_term` `file_renewal_term` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_comments` `file_comments` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `file_primary_screenshot` `file_primary_screenshot` INT (11) NULL COMMENT 'The record_id of the primary screenshot', CHANGE COLUMN `file_reviews` `file_reviews` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `file_locked` `file_locked` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'If the file is locked (no comments/reviews allowed)', CHANGE COLUMN `file_last_comment` `file_last_comment` INT (10) UNSIGNED NULL COMMENT 'Timestamp the last comment was made', CHANGE COLUMN `file_last_review` `file_last_review` INT (10) UNSIGNED NULL COMMENT 'Unix timestamp of last review', CHANGE COLUMN `file_unapproved_comments` `file_unapproved_comments` INT (10) UNSIGNED NULL , CHANGE COLUMN `file_hidden_comments` `file_hidden_comments` INT (10) UNSIGNED NULL , CHANGE COLUMN `file_unapproved_reviews` `file_unapproved_reviews` INT (10) UNSIGNED NULL , CHANGE COLUMN `file_hidden_reviews` `file_hidden_reviews` INT (10) UNSIGNED NULL ; UPDATE `downloads_files_records` SET `record_id`='' WHERE `record_id` IS NULL; UPDATE `downloads_files_records` SET `record_file_id`=0 WHERE `record_file_id` IS NULL; UPDATE `downloads_files_records` SET `record_size`=0 WHERE `record_size` IS NULL; UPDATE `downloads_files_records` SET `record_time`=0 WHERE `record_time` IS NULL; ALTER TABLE `downloads_files_records` CHANGE COLUMN `record_id` `record_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `record_file_id` `record_file_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `record_size` `record_size` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `record_time` `record_time` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Unix timestamp of when file was uploaded'; UPDATE `downloads_comments` SET `comment_id`='' WHERE `comment_id` IS NULL; UPDATE `downloads_comments` SET `comment_fid`=0 WHERE `comment_fid` IS NULL; UPDATE `downloads_comments` SET `comment_mid`=0 WHERE `comment_mid` IS NULL; UPDATE `downloads_comments` SET `comment_date`=0 WHERE `comment_date` IS NULL; UPDATE `downloads_comments` SET `comment_edit_time`=0 WHERE `comment_edit_time` IS NULL; ALTER TABLE `downloads_comments` CHANGE COLUMN `comment_id` `comment_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `comment_fid` `comment_fid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_mid` `comment_mid` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_date` `comment_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_edit_time` `comment_edit_time` INT (10) NOT NULL DEFAULT 0 ; UPDATE `downloads_reviews` SET `review_id`='' WHERE `review_id` IS NULL; UPDATE `downloads_reviews` SET `review_fid`=0 WHERE `review_fid` IS NULL; UPDATE `downloads_reviews` SET `review_mid`=0 WHERE `review_mid` IS NULL; UPDATE `downloads_reviews` SET `review_append_edit`=0 WHERE `review_append_edit` IS NULL; UPDATE `downloads_reviews` SET `review_votes`=0 WHERE `review_votes` IS NULL; UPDATE `downloads_reviews` SET `review_votes_helpful`=0 WHERE `review_votes_helpful` IS NULL; ALTER TABLE `downloads_reviews` CHANGE COLUMN `review_id` `review_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `review_fid` `review_fid` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The file ID', CHANGE COLUMN `review_mid` `review_mid` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The member ID of the review author', CHANGE COLUMN `review_append_edit` `review_append_edit` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Boolean indicating if edit message should show', CHANGE COLUMN `review_edit_time` `review_edit_time` INT (10) UNSIGNED NULL COMMENT 'Unix timestamp of when the review was last edited', CHANGE COLUMN `review_date` `review_date` INT (10) NULL COMMENT 'Unix timestamp of when review was made', CHANGE COLUMN `review_rating` `review_rating` TINYINT (1) UNSIGNED NULL COMMENT 'The rating (out of 5) with the review', CHANGE COLUMN `review_votes` `review_votes` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The number of people who have voted \"helpful\" or \"unhelpful\"', CHANGE COLUMN `review_votes_helpful` `review_votes_helpful` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The number of people who have voted \"helpful\"'; UPDATE `downloads_downloads` SET `did`='' WHERE `did` IS NULL; UPDATE `downloads_downloads` SET `dfid`=0 WHERE `dfid` IS NULL; UPDATE `downloads_downloads` SET `dtime`=0 WHERE `dtime` IS NULL; UPDATE `downloads_downloads` SET `dmid`=0 WHERE `dmid` IS NULL; UPDATE `downloads_downloads` SET `dsize`=0 WHERE `dsize` IS NULL; ALTER TABLE `downloads_downloads` CHANGE COLUMN `did` `did` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `dfid` `dfid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `dtime` `dtime` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `dmid` `dmid` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `dsize` `dsize` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `downloads_filebackup` SET `b_id`='' WHERE `b_id` IS NULL; UPDATE `downloads_filebackup` SET `b_fileid`=0 WHERE `b_fileid` IS NULL; UPDATE `downloads_filebackup` SET `b_backup`=0 WHERE `b_backup` IS NULL; UPDATE `downloads_filebackup` SET `b_updated`=0 WHERE `b_updated` IS NULL; ALTER TABLE `downloads_filebackup` CHANGE COLUMN `b_id` `b_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `b_fileid` `b_fileid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `b_backup` `b_backup` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `b_updated` `b_updated` INT (10) NOT NULL DEFAULT 0 ; UPDATE `downloads_ccontent` SET `file_id`=0 WHERE `file_id` IS NULL; ALTER TABLE `downloads_ccontent` CHANGE COLUMN `file_id` `file_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `updated` `updated` INT (10) NULL DEFAULT 0 ; UPDATE `downloads_sessions` SET `dsess_mid`=0 WHERE `dsess_mid` IS NULL; UPDATE `downloads_sessions` SET `dsess_file`=0 WHERE `dsess_file` IS NULL; UPDATE `downloads_sessions` SET `dsess_start`=0 WHERE `dsess_start` IS NULL; UPDATE `downloads_sessions` SET `dsess_end`=0 WHERE `dsess_end` IS NULL; ALTER TABLE `downloads_sessions` CHANGE COLUMN `dsess_mid` `dsess_mid` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `dsess_file` `dsess_file` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `dsess_start` `dsess_start` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `dsess_end` `dsess_end` INT (10) NOT NULL DEFAULT 0 ; ALTER TABLE `core_groups` CHANGE COLUMN `idm_view_approvers` `idm_view_approvers` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can view who approved files?' ALTER TABLE `core_groups` CHANGE COLUMN `idm_bypass_revision` `idm_bypass_revision` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can bypass revisions?' ALTER TABLE `core_groups` CHANGE COLUMN `idm_view_downloads` `idm_view_downloads` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can view who downloaded files?' ALTER TABLE `core_groups` CHANGE COLUMN `idm_throttling` `idm_throttling` INT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Downloads Speed Throttling kb' ALTER TABLE `core_groups` CHANGE COLUMN `idm_wait_period` `idm_wait_period` INT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Seconds users must wait before download' ALTER TABLE `core_groups` CHANGE COLUMN `idm_linked_files` `idm_linked_files` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can submit URLs?' ALTER TABLE `core_groups` CHANGE COLUMN `idm_import_files` `idm_import_files` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can import files from a path?' ALTER TABLE `core_members` CHANGE COLUMN `idm_block_submissions` `idm_block_submissions` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Blocked from submitting Downloads files?' ALTER TABLE `core_groups` CHANGE COLUMN `idm_bulk_submit` `idm_bulk_submit` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can bulk upload?' ALTER TABLE `core_groups` CHANGE COLUMN `idm_add_paid` `idm_add_paid` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can submit paid files?' ALTER TABLE `core_groups` CHANGE COLUMN `idm_bypass_paid` `idm_bypass_paid` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can download paid files without paying?' ALTER TABLE `core_groups` CHANGE COLUMN `idm_paid_restrictions` `idm_paid_restrictions` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Download restrictions apply to Paid files?' UPDATE `blog_blogs` SET `blog_id`='' WHERE `blog_id` IS NULL; UPDATE `blog_blogs` SET `blog_member_id`=0 WHERE `blog_member_id` IS NULL; UPDATE `blog_blogs` SET `blog_last_edate`=0 WHERE `blog_last_edate` IS NULL; UPDATE `blog_blogs` SET `blog_count_entries`=0 WHERE `blog_count_entries` IS NULL; UPDATE `blog_blogs` SET `blog_count_comments`=0 WHERE `blog_count_comments` IS NULL; UPDATE `blog_blogs` SET `blog_count_entries_hidden`=0 WHERE `blog_count_entries_hidden` IS NULL; UPDATE `blog_blogs` SET `blog_count_comments_hidden`=0 WHERE `blog_count_comments_hidden` IS NULL; UPDATE `blog_blogs` SET `blog_count_entries_future`=0 WHERE `blog_count_entries_future` IS NULL; ALTER TABLE `blog_blogs` CHANGE COLUMN `blog_id` `blog_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `blog_member_id` `blog_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `blog_num_views` `blog_num_views` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `blog_rating_total` `blog_rating_total` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `blog_rating_count` `blog_rating_count` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `blog_editors` `blog_editors` INT (3) NULL , CHANGE COLUMN `blog_last_edate` `blog_last_edate` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `blog_count_entries` `blog_count_entries` INT (11) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `blog_count_comments` `blog_count_comments` INT (11) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `blog_count_entries_hidden` `blog_count_entries_hidden` INT (11) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `blog_count_comments_hidden` `blog_count_comments_hidden` INT (11) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `blog_cover_photo_offset` `blog_cover_photo_offset` INT (10) NULL , CHANGE COLUMN `blog_social_group` `blog_social_group` INT (10) UNSIGNED NULL COMMENT 'The social group ID, is this is a private blog', CHANGE COLUMN `blog_count_entries_future` `blog_count_entries_future` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `blog_club_id` `blog_club_id` BIGINT (20) UNSIGNED NULL COMMENT 'The club ID if this blog belongs to a club, or NULL'; UPDATE `blog_entries` SET `entry_id`='' WHERE `entry_id` IS NULL; UPDATE `blog_entries` SET `entry_blog_id`=0 WHERE `entry_blog_id` IS NULL; UPDATE `blog_entries` SET `entry_author_id`=0 WHERE `entry_author_id` IS NULL; UPDATE `blog_entries` SET `entry_queued_comments`=0 WHERE `entry_queued_comments` IS NULL; UPDATE `blog_entries` SET `entry_publish_date`=0 WHERE `entry_publish_date` IS NULL; UPDATE `blog_entries` SET `entry_views`=0 WHERE `entry_views` IS NULL; UPDATE `blog_entries` SET `entry_pinned`=0 WHERE `entry_pinned` IS NULL; UPDATE `blog_entries` SET `entry_is_future_entry`=0 WHERE `entry_is_future_entry` IS NULL; ALTER TABLE `blog_entries` CHANGE COLUMN `entry_id` `entry_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `entry_blog_id` `entry_blog_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `entry_author_id` `entry_author_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `entry_date` `entry_date` INT (10) NULL , CHANGE COLUMN `entry_num_comments` `entry_num_comments` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `entry_last_comment_mid` `entry_last_comment_mid` BIGINT (20) NULL , CHANGE COLUMN `entry_queued_comments` `entry_queued_comments` SMALLINT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `entry_edit_time` `entry_edit_time` INT (10) NULL , CHANGE COLUMN `entry_last_update` `entry_last_update` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `entry_gallery_album` `entry_gallery_album` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `entry_poll_state` `entry_poll_state` INT (8) UNSIGNED NULL , CHANGE COLUMN `entry_publish_date` `entry_publish_date` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `entry_views` `entry_views` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `entry_pinned` `entry_pinned` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `entry_cover_photo_offset` `entry_cover_photo_offset` INT (10) UNSIGNED NULL , CHANGE COLUMN `entry_hidden_comments` `entry_hidden_comments` INT (10) UNSIGNED NULL , CHANGE COLUMN `entry_is_future_entry` `entry_is_future_entry` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Flag to show if an entry is set to be published in the future via the task'; UPDATE `blog_comments` SET `comment_id`='' WHERE `comment_id` IS NULL; UPDATE `blog_comments` SET `comment_entry_id`=0 WHERE `comment_entry_id` IS NULL; UPDATE `blog_comments` SET `comment_edit_show`=0 WHERE `comment_edit_show` IS NULL; ALTER TABLE `blog_comments` CHANGE COLUMN `comment_id` `comment_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `comment_entry_id` `comment_entry_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_member_id` `comment_member_id` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `comment_date` `comment_date` INT (10) NULL , CHANGE COLUMN `comment_edit_time` `comment_edit_time` INT (10) NULL , CHANGE COLUMN `comment_approved` `comment_approved` INT (1) NULL DEFAULT 0 , CHANGE COLUMN `comment_edit_show` `comment_edit_show` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `blog_rss_import` SET `rss_id`='' WHERE `rss_id` IS NULL; UPDATE `blog_rss_import` SET `rss_blog_id`=0 WHERE `rss_blog_id` IS NULL; UPDATE `blog_rss_import` SET `rss_last_import`=0 WHERE `rss_last_import` IS NULL; UPDATE `blog_rss_import` SET `rss_member`=0 WHERE `rss_member` IS NULL; ALTER TABLE `blog_rss_import` CHANGE COLUMN `rss_id` `rss_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `rss_blog_id` `rss_blog_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `rss_last_import` `rss_last_import` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `rss_member` `rss_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `blog_rss_imported` SET `rss_imported_entry_id`=0 WHERE `rss_imported_entry_id` IS NULL; UPDATE `blog_rss_imported` SET `rss_imported_impid`=0 WHERE `rss_imported_impid` IS NULL; ALTER TABLE `blog_rss_imported` CHANGE COLUMN `rss_imported_entry_id` `rss_imported_entry_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `rss_imported_impid` `rss_imported_impid` INT (10) NOT NULL DEFAULT 0 ; ALTER TABLE `core_groups` CHANGE COLUMN `g_blog_allowlocal` `g_blog_allowlocal` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can create blogs?' ALTER TABLE `core_groups` CHANGE COLUMN `g_blog_maxblogs` `g_blog_maxblogs` INT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Maximum number of blogs' ALTER TABLE `core_groups` CHANGE COLUMN `g_blog_allowprivate` `g_blog_allowprivate` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can create private blogs?' ALTER TABLE `core_groups` CHANGE COLUMN `g_blog_allowownmod` `g_blog_allowownmod` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can moderate own blogs?' ALTER TABLE `core_groups` CHANGE COLUMN `g_blog_allowdelete` `g_blog_allowdelete` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can delete own blogs?' ALTER TABLE `core_groups` CHANGE COLUMN `g_blog_allowcomment` `g_blog_allowcomment` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can comment on blogs?' UPDATE `calendar_calendars` SET `cal_id`='' WHERE `cal_id` IS NULL; UPDATE `calendar_calendars` SET `cal_position`=0 WHERE `cal_position` IS NULL; UPDATE `calendar_calendars` SET `cal_allow_comments`=1 WHERE `cal_allow_comments` IS NULL; UPDATE `calendar_calendars` SET `cal_allow_reviews`=0 WHERE `cal_allow_reviews` IS NULL; UPDATE `calendar_calendars` SET `cal_review_moderate`=0 WHERE `cal_review_moderate` IS NULL; UPDATE `calendar_calendars` SET `cal_calendar_bitoptions`=0 WHERE `cal_calendar_bitoptions` IS NULL; ALTER TABLE `calendar_calendars` CHANGE COLUMN `cal_id` `cal_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `cal_position` `cal_position` INT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `cal_allow_comments` `cal_allow_comments` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `cal_allow_reviews` `cal_allow_reviews` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `cal_review_moderate` `cal_review_moderate` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `cal_club_id` `cal_club_id` BIGINT (20) UNSIGNED NULL COMMENT 'The club ID if this calendar belongs to a club, or NULL', CHANGE COLUMN `cal_calendar_bitoptions` `cal_calendar_bitoptions` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `calendar_event_comments` SET `comment_id`='' WHERE `comment_id` IS NULL; UPDATE `calendar_event_comments` SET `comment_eid`=0 WHERE `comment_eid` IS NULL; UPDATE `calendar_event_comments` SET `comment_mid`=0 WHERE `comment_mid` IS NULL; UPDATE `calendar_event_comments` SET `comment_date`=0 WHERE `comment_date` IS NULL; UPDATE `calendar_event_comments` SET `comment_edit_time`=0 WHERE `comment_edit_time` IS NULL; ALTER TABLE `calendar_event_comments` CHANGE COLUMN `comment_id` `comment_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `comment_eid` `comment_eid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_mid` `comment_mid` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_date` `comment_date` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_edit_time` `comment_edit_time` INT (11) NOT NULL DEFAULT 0 ; UPDATE `calendar_event_rsvp` SET `rsvp_id`='' WHERE `rsvp_id` IS NULL; UPDATE `calendar_event_rsvp` SET `rsvp_event_id`=0 WHERE `rsvp_event_id` IS NULL; UPDATE `calendar_event_rsvp` SET `rsvp_member_id`=0 WHERE `rsvp_member_id` IS NULL; UPDATE `calendar_event_rsvp` SET `rsvp_date`=0 WHERE `rsvp_date` IS NULL; UPDATE `calendar_event_rsvp` SET `rsvp_response`=0 WHERE `rsvp_response` IS NULL; ALTER TABLE `calendar_event_rsvp` CHANGE COLUMN `rsvp_id` `rsvp_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `rsvp_event_id` `rsvp_event_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `rsvp_member_id` `rsvp_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `rsvp_date` `rsvp_date` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `rsvp_response` `rsvp_response` TINYINT (3) UNSIGNED NOT NULL DEFAULT 0 COMMENT '0=No, 1=Yes, 2=Maybe'; UPDATE `calendar_events` SET `event_id`='' WHERE `event_id` IS NULL; UPDATE `calendar_events` SET `event_calendar_id`=0 WHERE `event_calendar_id` IS NULL; UPDATE `calendar_events` SET `event_member_id`=0 WHERE `event_member_id` IS NULL; UPDATE `calendar_events` SET `event_comments`=0 WHERE `event_comments` IS NULL; UPDATE `calendar_events` SET `event_saved`=0 WHERE `event_saved` IS NULL; UPDATE `calendar_events` SET `event_lastupdated`=0 WHERE `event_lastupdated` IS NULL; UPDATE `calendar_events` SET `event_rating`=0 WHERE `event_rating` IS NULL; UPDATE `calendar_events` SET `event_sequence`=0 WHERE `event_sequence` IS NULL; UPDATE `calendar_events` SET `event_all_day`=0 WHERE `event_all_day` IS NULL; UPDATE `calendar_events` SET `event_reviews`=0 WHERE `event_reviews` IS NULL; UPDATE `calendar_events` SET `event_locked`=0 WHERE `event_locked` IS NULL; UPDATE `calendar_events` SET `event_featured`=0 WHERE `event_featured` IS NULL; UPDATE `calendar_events` SET `event_cover_offset`=0 WHERE `event_cover_offset` IS NULL; ALTER TABLE `calendar_events` CHANGE COLUMN `event_id` `event_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , DROP INDEX `recurring_events`, CHANGE COLUMN `event_calendar_id` `event_calendar_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , ADD KEY `recurring_events` (`event_recurring`(180),`event_approved`,`event_calendar_id`), CHANGE COLUMN `event_member_id` `event_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `event_comments` `event_comments` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `event_saved` `event_saved` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `event_lastupdated` `event_lastupdated` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `event_rating` `event_rating` SMALLINT (5) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `event_sequence` `event_sequence` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `event_all_day` `event_all_day` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `event_reviews` `event_reviews` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `event_locked` `event_locked` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Whether the event is locked (for new comments/reviews) or not', CHANGE COLUMN `event_featured` `event_featured` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Whether the event is featured or not', CHANGE COLUMN `event_last_comment` `event_last_comment` INT (11) UNSIGNED NULL , CHANGE COLUMN `event_last_review` `event_last_review` INT (11) UNSIGNED NULL , CHANGE COLUMN `event_approved_by` `event_approved_by` BIGINT (20) UNSIGNED NULL COMMENT 'Member ID who approved the event', CHANGE COLUMN `event_approved_on` `event_approved_on` INT (11) UNSIGNED NULL COMMENT 'Date the event was approved on', CHANGE COLUMN `event_rsvp_limit` `event_rsvp_limit` INT (10) NULL COMMENT 'Maximum number of attendees allowed for the event', CHANGE COLUMN `event_album` `event_album` MEDIUMINT (8) UNSIGNED NULL COMMENT 'Holds album ID associated with this event', CHANGE COLUMN `event_cover_offset` `event_cover_offset` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `event_queued_comments` `event_queued_comments` INT (10) UNSIGNED NULL , CHANGE COLUMN `event_hidden_comments` `event_hidden_comments` INT (10) UNSIGNED NULL , CHANGE COLUMN `event_unapproved_reviews` `event_unapproved_reviews` INT (10) UNSIGNED NULL , CHANGE COLUMN `event_hidden_reviews` `event_hidden_reviews` INT (10) UNSIGNED NULL , CHANGE COLUMN `event_venue` `event_venue` INT (5) UNSIGNED NULL ; UPDATE `calendar_import_feeds` SET `feed_id`='' WHERE `feed_id` IS NULL; UPDATE `calendar_import_feeds` SET `feed_added`=0 WHERE `feed_added` IS NULL; UPDATE `calendar_import_feeds` SET `feed_lastupdated`=0 WHERE `feed_lastupdated` IS NULL; UPDATE `calendar_import_feeds` SET `feed_calendar_id`=0 WHERE `feed_calendar_id` IS NULL; UPDATE `calendar_import_feeds` SET `feed_member_id`=0 WHERE `feed_member_id` IS NULL; UPDATE `calendar_import_feeds` SET `feed_last_run`=0 WHERE `feed_last_run` IS NULL; UPDATE `calendar_import_feeds` SET `feed_allow_rsvp`=0 WHERE `feed_allow_rsvp` IS NULL; ALTER TABLE `calendar_import_feeds` CHANGE COLUMN `feed_id` `feed_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `feed_added` `feed_added` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `feed_lastupdated` `feed_lastupdated` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `feed_calendar_id` `feed_calendar_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `feed_member_id` `feed_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `feed_last_run` `feed_last_run` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `feed_allow_rsvp` `feed_allow_rsvp` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `feed_venue_id` `feed_venue_id` INT (5) UNSIGNED NULL ; UPDATE `calendar_import_map` SET `import_id`='' WHERE `import_id` IS NULL; UPDATE `calendar_import_map` SET `import_feed_id`=0 WHERE `import_feed_id` IS NULL; UPDATE `calendar_import_map` SET `import_event_id`=0 WHERE `import_event_id` IS NULL; ALTER TABLE `calendar_import_map` CHANGE COLUMN `import_id` `import_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `import_feed_id` `import_feed_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `import_event_id` `import_event_id` INT (11) NOT NULL DEFAULT 0 ; UPDATE `calendar_event_reviews` SET `review_id`='' WHERE `review_id` IS NULL; UPDATE `calendar_event_reviews` SET `review_eid`=0 WHERE `review_eid` IS NULL; UPDATE `calendar_event_reviews` SET `review_mid`=0 WHERE `review_mid` IS NULL; UPDATE `calendar_event_reviews` SET `review_append_edit`=0 WHERE `review_append_edit` IS NULL; UPDATE `calendar_event_reviews` SET `review_votes`=0 WHERE `review_votes` IS NULL; UPDATE `calendar_event_reviews` SET `review_votes_helpful`=0 WHERE `review_votes_helpful` IS NULL; ALTER TABLE `calendar_event_reviews` CHANGE COLUMN `review_id` `review_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `review_eid` `review_eid` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The event ID', CHANGE COLUMN `review_mid` `review_mid` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The member ID of the review author', CHANGE COLUMN `review_append_edit` `review_append_edit` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Boolean indicating if edit message should show', CHANGE COLUMN `review_edit_time` `review_edit_time` INT (10) UNSIGNED NULL COMMENT 'Unix timestamp of when the review was last edited', CHANGE COLUMN `review_date` `review_date` INT (10) NULL COMMENT 'Unix timestamp of when review was made', CHANGE COLUMN `review_rating` `review_rating` TINYINT (1) UNSIGNED NULL COMMENT 'The rating (out of 5) with the review', CHANGE COLUMN `review_votes` `review_votes` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The number of people who have voted \"helpful\" or \"unhelpful\"', CHANGE COLUMN `review_votes_helpful` `review_votes_helpful` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The number of people who have voted \"helpful\"'; UPDATE `calendar_event_reminders` SET `reminder_id`='' WHERE `reminder_id` IS NULL; UPDATE `calendar_event_reminders` SET `reminder_member_id`='' WHERE `reminder_member_id` IS NULL; UPDATE `calendar_event_reminders` SET `reminder_date`='' WHERE `reminder_date` IS NULL; UPDATE `calendar_event_reminders` SET `reminder_days_before`='' WHERE `reminder_days_before` IS NULL; ALTER TABLE `calendar_event_reminders` CHANGE COLUMN `reminder_id` `reminder_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `reminder_event_id` `reminder_event_id` BIGINT (10) UNSIGNED NULL COMMENT 'Event to remind about', CHANGE COLUMN `reminder_member_id` `reminder_member_id` BIGINT (20) UNSIGNED NOT NULL COMMENT 'Member to notify', CHANGE COLUMN `reminder_date` `reminder_date` INT (10) UNSIGNED NOT NULL COMMENT 'Timestamp after which to send notification', CHANGE COLUMN `reminder_days_before` `reminder_days_before` INT (2) UNSIGNED NOT NULL ; UPDATE `calendar_venues` SET `venue_id`='' WHERE `venue_id` IS NULL; ALTER TABLE `calendar_venues` CHANGE COLUMN `venue_id` `venue_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `venue_position` `venue_position` INT (5) UNSIGNED NULL , CHANGE COLUMN `venue_enabled` `venue_enabled` TINYINT (1) UNSIGNED NULL DEFAULT 1 ; UPDATE `cms_page_widget_areas` SET `area_page_id`=0 WHERE `area_page_id` IS NULL; CREATE TABLE `cms_page_widget_areas_new` LIKE `cms_page_widget_areas`; ALTER TABLE `cms_page_widget_areas_new` DROP INDEX `area_page_area`, CHANGE COLUMN `area_page_id` `area_page_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The page ID', ADD UNIQUE KEY `area_page_area` (`area_page_id`,`area_area`(171)); INSERT IGNORE INTO `cms_page_widget_areas_new` SELECT * FROM `cms_page_widget_areas`; DROP TABLE `cms_page_widget_areas`; RENAME TABLE `cms_page_widget_areas_new` TO `cms_page_widget_areas`; ALTER TABLE `cms_url_store` CHANGE COLUMN `store_current_id` `store_current_id` INT (10) UNSIGNED NULL DEFAULT 0 ; UPDATE `cms_blocks` SET `block_id`='' WHERE `block_id` IS NULL; UPDATE `cms_blocks` SET `block_position`=0 WHERE `block_position` IS NULL; UPDATE `cms_blocks` SET `block_category`=0 WHERE `block_category` IS NULL; UPDATE `cms_blocks` SET `block_cache`=0 WHERE `block_cache` IS NULL; ALTER TABLE `cms_blocks` CHANGE COLUMN `block_id` `block_id` MEDIUMINT (9) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `block_position` `block_position` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `block_category` `block_category` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `block_cache` `block_cache` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `block_plugin_plugin` `block_plugin_plugin` INT (10) UNSIGNED NULL ; UPDATE `cms_containers` SET `container_id`='' WHERE `container_id` IS NULL; UPDATE `cms_containers` SET `container_order`=0 WHERE `container_order` IS NULL; ALTER TABLE `cms_containers` CHANGE COLUMN `container_id` `container_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `container_order` `container_order` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `container_parent_id` `container_parent_id` INT (10) UNSIGNED NULL DEFAULT 0 ; UPDATE `cms_databases` SET `database_id`='' WHERE `database_id` IS NULL; UPDATE `cms_databases` SET `database_record_count`=0 WHERE `database_record_count` IS NULL; UPDATE `cms_databases` SET `database_field_perpage`=25 WHERE `database_field_perpage` IS NULL; UPDATE `cms_databases` SET `database_rss`=0 WHERE `database_rss` IS NULL; UPDATE `cms_databases` SET `database_forum_forum`=0 WHERE `database_forum_forum` IS NULL; UPDATE `cms_databases` SET `database_tags_enabled`=0 WHERE `database_tags_enabled` IS NULL; UPDATE `cms_databases` SET `database_tags_noprefixes`=0 WHERE `database_tags_noprefixes` IS NULL; UPDATE `cms_databases` SET `database_cat_index_type`=0 WHERE `database_cat_index_type` IS NULL; UPDATE `cms_databases` SET `database_page_id`=0 WHERE `database_page_id` IS NULL; UPDATE `cms_databases` SET `database_use_categories`=1 WHERE `database_use_categories` IS NULL; UPDATE `cms_databases` SET `database_default_category`=0 WHERE `database_default_category` IS NULL; UPDATE `cms_databases` SET `database_options`=0 WHERE `database_options` IS NULL; UPDATE `cms_databases` SET `database_use_as_page_title`=1 WHERE `database_use_as_page_title` IS NULL; ALTER TABLE `cms_databases` CHANGE COLUMN `database_id` `database_id` MEDIUMINT (9) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `database_record_count` `database_record_count` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `database_field_perpage` `database_field_perpage` SMALLINT (6) NOT NULL DEFAULT 25 , CHANGE COLUMN `database_rss` `database_rss` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `database_forum_forum` `database_forum_forum` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `database_tags_enabled` `database_tags_enabled` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `database_tags_noprefixes` `database_tags_noprefixes` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `database_cat_index_type` `database_cat_index_type` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `database_page_id` `database_page_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Page ID this database is used on (if any)', CHANGE COLUMN `database_use_categories` `database_use_categories` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `database_default_category` `database_default_category` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `database_options` `database_options` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `database_use_as_page_title` `database_use_as_page_title` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'Use database name as page title, or retain page title', CHANGE COLUMN `database_canonical_flag` `database_canonical_flag` TINYINT (1) UNSIGNED NULL DEFAULT 0 ; UPDATE `cms_database_categories` SET `category_id`='' WHERE `category_id` IS NULL; UPDATE `cms_database_categories` SET `category_database_id`=0 WHERE `category_database_id` IS NULL; UPDATE `cms_database_categories` SET `category_parent_id`=0 WHERE `category_parent_id` IS NULL; UPDATE `cms_database_categories` SET `category_last_record_id`=0 WHERE `category_last_record_id` IS NULL; UPDATE `cms_database_categories` SET `category_last_record_date`=0 WHERE `category_last_record_date` IS NULL; UPDATE `cms_database_categories` SET `category_last_record_member`=0 WHERE `category_last_record_member` IS NULL; UPDATE `cms_database_categories` SET `category_position`=0 WHERE `category_position` IS NULL; UPDATE `cms_database_categories` SET `category_records`=0 WHERE `category_records` IS NULL; UPDATE `cms_database_categories` SET `category_records_queued`=0 WHERE `category_records_queued` IS NULL; UPDATE `cms_database_categories` SET `category_record_comments`=0 WHERE `category_record_comments` IS NULL; UPDATE `cms_database_categories` SET `category_record_comments_queued`=0 WHERE `category_record_comments_queued` IS NULL; UPDATE `cms_database_categories` SET `category_forum_forum`=0 WHERE `category_forum_forum` IS NULL; UPDATE `cms_database_categories` SET `category_allow_rating`=0 WHERE `category_allow_rating` IS NULL; UPDATE `cms_database_categories` SET `category_records_future`=0 WHERE `category_records_future` IS NULL; UPDATE `cms_database_categories` SET `category_record_reviews`=0 WHERE `category_record_reviews` IS NULL; UPDATE `cms_database_categories` SET `category_record_reviews_queued`=0 WHERE `category_record_reviews_queued` IS NULL; UPDATE `cms_database_categories` SET `category_options`=0 WHERE `category_options` IS NULL; UPDATE `cms_database_categories` SET `category_can_view_others`=1 WHERE `category_can_view_others` IS NULL; ALTER TABLE `cms_database_categories` CHANGE COLUMN `category_id` `category_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `category_database_id` `category_database_id` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_parent_id` `category_parent_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_last_record_id` `category_last_record_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_last_record_date` `category_last_record_date` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_last_record_member` `category_last_record_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `category_position` `category_position` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_records` `category_records` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_records_queued` `category_records_queued` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_record_comments` `category_record_comments` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_record_comments_queued` `category_record_comments_queued` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_forum_forum` `category_forum_forum` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_allow_rating` `category_allow_rating` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `category_records_future` `category_records_future` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_record_reviews` `category_record_reviews` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `category_record_reviews_queued` `category_record_reviews_queued` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `category_options` `category_options` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_can_view_others` `category_can_view_others` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 ; UPDATE `cms_database_comments` SET `comment_id`='' WHERE `comment_id` IS NULL; UPDATE `cms_database_comments` SET `comment_user`=0 WHERE `comment_user` IS NULL; UPDATE `cms_database_comments` SET `comment_database_id`=0 WHERE `comment_database_id` IS NULL; UPDATE `cms_database_comments` SET `comment_record_id`=0 WHERE `comment_record_id` IS NULL; UPDATE `cms_database_comments` SET `comment_date`=0 WHERE `comment_date` IS NULL; UPDATE `cms_database_comments` SET `comment_edit_date`=0 WHERE `comment_edit_date` IS NULL; UPDATE `cms_database_comments` SET `comment_edit_member_id`=0 WHERE `comment_edit_member_id` IS NULL; UPDATE `cms_database_comments` SET `comment_edit_show`=0 WHERE `comment_edit_show` IS NULL; ALTER TABLE `cms_database_comments` CHANGE COLUMN `comment_id` `comment_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `comment_user` `comment_user` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_database_id` `comment_database_id` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_record_id` `comment_record_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_date` `comment_date` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_edit_date` `comment_edit_date` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_edit_member_id` `comment_edit_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_edit_show` `comment_edit_show` SMALLINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `cms_database_fields` SET `field_id`='' WHERE `field_id` IS NULL; UPDATE `cms_database_fields` SET `field_database_id`=0 WHERE `field_database_id` IS NULL; UPDATE `cms_database_fields` SET `field_position`=0 WHERE `field_position` IS NULL; UPDATE `cms_database_fields` SET `field_max_length`=0 WHERE `field_max_length` IS NULL; UPDATE `cms_database_fields` SET `field_html`=0 WHERE `field_html` IS NULL; UPDATE `cms_database_fields` SET `field_truncate`=100 WHERE `field_truncate` IS NULL; UPDATE `cms_database_fields` SET `field_unique`=0 WHERE `field_unique` IS NULL; UPDATE `cms_database_fields` SET `field_allow_attachments`=1 WHERE `field_allow_attachments` IS NULL; ALTER TABLE `cms_database_fields` CHANGE COLUMN `field_id` `field_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `field_database_id` `field_database_id` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `field_position` `field_position` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `field_max_length` `field_max_length` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `field_html` `field_html` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `field_truncate` `field_truncate` MEDIUMINT (9) NOT NULL DEFAULT 100 , CHANGE COLUMN `field_display_commentform` `field_display_commentform` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Determines if this field should show and be editable on the comment reply form.', CHANGE COLUMN `field_unique` `field_unique` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `field_allow_attachments` `field_allow_attachments` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 ; UPDATE `cms_database_revisions` SET `revision_id`='' WHERE `revision_id` IS NULL; UPDATE `cms_database_revisions` SET `revision_database_id`=0 WHERE `revision_database_id` IS NULL; UPDATE `cms_database_revisions` SET `revision_record_id`=0 WHERE `revision_record_id` IS NULL; UPDATE `cms_database_revisions` SET `revision_member_id`=0 WHERE `revision_member_id` IS NULL; ALTER TABLE `cms_database_revisions` CHANGE COLUMN `revision_id` `revision_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `revision_database_id` `revision_database_id` MEDIUMINT (9) NOT NULL DEFAULT 0 , CHANGE COLUMN `revision_record_id` `revision_record_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `revision_member_id` `revision_member_id` BIGINT (20) NOT NULL DEFAULT 0 ; UPDATE `cms_folders` SET `folder_last_modified`=0 WHERE `folder_last_modified` IS NULL; UPDATE `cms_folders` SET `folder_id`='' WHERE `folder_id` IS NULL; UPDATE `cms_folders` SET `folder_parent_id`=0 WHERE `folder_parent_id` IS NULL; ALTER TABLE `cms_folders` CHANGE COLUMN `folder_last_modified` `folder_last_modified` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `folder_id` `folder_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `folder_parent_id` `folder_parent_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `cms_pages` SET `page_id`='' WHERE `page_id` IS NULL; UPDATE `cms_pages` SET `page_quicknav`=1 WHERE `page_quicknav` IS NULL; UPDATE `cms_pages` SET `page_folder_id`=0 WHERE `page_folder_id` IS NULL; UPDATE `cms_pages` SET `page_default`=0 WHERE `page_default` IS NULL; UPDATE `cms_pages` SET `page_has_error`=0 WHERE `page_has_error` IS NULL; ALTER TABLE `cms_pages` CHANGE COLUMN `page_id` `page_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `page_theme` `page_theme` INT (8) UNSIGNED NULL DEFAULT 0 , CHANGE COLUMN `page_quicknav` `page_quicknav` TINYINT (4) NOT NULL DEFAULT 1 , DROP INDEX `page_folder`, CHANGE COLUMN `page_folder_id` `page_folder_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , ADD KEY `page_folder` (`page_folder_id`,`page_seo_name`(181)), CHANGE COLUMN `page_show_sidebar` `page_show_sidebar` INT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Display the standard suite sidebar', CHANGE COLUMN `page_default` `page_default` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `page_has_error` `page_has_error` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `cms_templates` SET `template_id`='' WHERE `template_id` IS NULL; UPDATE `cms_templates` SET `template_position`=0 WHERE `template_position` IS NULL; UPDATE `cms_templates` SET `template_rel_id`=0 WHERE `template_rel_id` IS NULL; UPDATE `cms_templates` SET `template_updated`=0 WHERE `template_updated` IS NULL; UPDATE `cms_templates` SET `template_user_created`=0 WHERE `template_user_created` IS NULL; UPDATE `cms_templates` SET `template_user_edited`=0 WHERE `template_user_edited` IS NULL; ALTER TABLE `cms_templates` CHANGE COLUMN `template_id` `template_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `template_container` `template_container` INT (10) NULL DEFAULT 0 , CHANGE COLUMN `template_position` `template_position` INT (3) NOT NULL DEFAULT 0 , CHANGE COLUMN `template_rel_id` `template_rel_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `template_updated` `template_updated` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `template_user_created` `template_user_created` INT (1) NOT NULL DEFAULT 0 , DROP INDEX `template_location`, CHANGE COLUMN `template_user_edited` `template_user_edited` INT (1) NOT NULL DEFAULT 0 , ADD KEY `template_location` (`template_location`(190),`template_user_edited`); UPDATE `cms_database_reviews` SET `review_id`='' WHERE `review_id` IS NULL; UPDATE `cms_database_reviews` SET `review_database_id`=0 WHERE `review_database_id` IS NULL; UPDATE `cms_database_reviews` SET `review_item`=0 WHERE `review_item` IS NULL; UPDATE `cms_database_reviews` SET `review_author`=0 WHERE `review_author` IS NULL; UPDATE `cms_database_reviews` SET `review_date`=0 WHERE `review_date` IS NULL; UPDATE `cms_database_reviews` SET `review_edit_time`=0 WHERE `review_edit_time` IS NULL; UPDATE `cms_database_reviews` SET `review_edit_show`=0 WHERE `review_edit_show` IS NULL; UPDATE `cms_database_reviews` SET `review_rating`=0 WHERE `review_rating` IS NULL; UPDATE `cms_database_reviews` SET `review_votes_total`=0 WHERE `review_votes_total` IS NULL; UPDATE `cms_database_reviews` SET `review_votes_helpful`=0 WHERE `review_votes_helpful` IS NULL; UPDATE `cms_database_reviews` SET `review_approved`=0 WHERE `review_approved` IS NULL; ALTER TABLE `cms_database_reviews` CHANGE COLUMN `review_id` `review_id` BIGINT (20) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `review_database_id` `review_database_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_item` `review_item` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_author` `review_author` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_date` `review_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_edit_time` `review_edit_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_edit_show` `review_edit_show` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_rating` `review_rating` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_votes_total` `review_votes_total` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_votes_helpful` `review_votes_helpful` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_approved` `review_approved` INT (1) NOT NULL DEFAULT 0 ; UPDATE `cms_media` SET `media_id`='' WHERE `media_id` IS NULL; UPDATE `cms_media` SET `media_parent`=0 WHERE `media_parent` IS NULL; UPDATE `cms_media` SET `media_added`=0 WHERE `media_added` IS NULL; UPDATE `cms_media` SET `media_is_image`=0 WHERE `media_is_image` IS NULL; ALTER TABLE `cms_media` CHANGE COLUMN `media_id` `media_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `media_parent` `media_parent` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `media_added` `media_added` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `media_is_image` `media_is_image` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `cms_media_folders` SET `media_folder_id`='' WHERE `media_folder_id` IS NULL; UPDATE `cms_media_folders` SET `media_folder_parent`=0 WHERE `media_folder_parent` IS NULL; ALTER TABLE `cms_media_folders` CHANGE COLUMN `media_folder_id` `media_folder_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `media_folder_parent` `media_folder_parent` INT (10) NOT NULL DEFAULT 0 ; UPDATE `cms_database_fields_reciprocal_map` SET `map_origin_database_id`=0 WHERE `map_origin_database_id` IS NULL; UPDATE `cms_database_fields_reciprocal_map` SET `map_foreign_database_id`=0 WHERE `map_foreign_database_id` IS NULL; UPDATE `cms_database_fields_reciprocal_map` SET `map_origin_item_id`=0 WHERE `map_origin_item_id` IS NULL; UPDATE `cms_database_fields_reciprocal_map` SET `map_foreign_item_id`=0 WHERE `map_foreign_item_id` IS NULL; UPDATE `cms_database_fields_reciprocal_map` SET `map_field_id`=0 WHERE `map_field_id` IS NULL; ALTER TABLE `cms_database_fields_reciprocal_map` CHANGE COLUMN `map_origin_database_id` `map_origin_database_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `map_foreign_database_id` `map_foreign_database_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `map_origin_item_id` `map_origin_item_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `map_foreign_item_id` `map_foreign_item_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `map_field_id` `map_field_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `cms_database_fields_thumbnails` SET `thumb_field_id`=0 WHERE `thumb_field_id` IS NULL; UPDATE `cms_database_fields_thumbnails` SET `thumb_database_id`=0 WHERE `thumb_database_id` IS NULL; UPDATE `cms_database_fields_thumbnails` SET `thumb_record_id`=0 WHERE `thumb_record_id` IS NULL; ALTER TABLE `cms_database_fields_thumbnails` CHANGE COLUMN `thumb_field_id` `thumb_field_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `thumb_database_id` `thumb_database_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `thumb_record_id` `thumb_record_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `gallery_albums` SET `album_id`='' WHERE `album_id` IS NULL; UPDATE `gallery_albums` SET `album_category_id`=0 WHERE `album_category_id` IS NULL; UPDATE `gallery_albums` SET `album_owner_id`=0 WHERE `album_owner_id` IS NULL; UPDATE `gallery_albums` SET `album_type`=0 WHERE `album_type` IS NULL; UPDATE `gallery_albums` SET `album_count_imgs`=0 WHERE `album_count_imgs` IS NULL; UPDATE `gallery_albums` SET `album_count_comments`=0 WHERE `album_count_comments` IS NULL; UPDATE `gallery_albums` SET `album_count_imgs_hidden`=0 WHERE `album_count_imgs_hidden` IS NULL; UPDATE `gallery_albums` SET `album_count_comments_hidden`=0 WHERE `album_count_comments_hidden` IS NULL; UPDATE `gallery_albums` SET `album_cover_img_id`=0 WHERE `album_cover_img_id` IS NULL; UPDATE `gallery_albums` SET `album_last_img_id`=0 WHERE `album_last_img_id` IS NULL; UPDATE `gallery_albums` SET `album_last_img_date`=0 WHERE `album_last_img_date` IS NULL; UPDATE `gallery_albums` SET `album_allow_comments`=0 WHERE `album_allow_comments` IS NULL; UPDATE `gallery_albums` SET `album_allow_rating`=0 WHERE `album_allow_rating` IS NULL; UPDATE `gallery_albums` SET `album_rating_count`=0 WHERE `album_rating_count` IS NULL; UPDATE `gallery_albums` SET `album_rating_total`=0 WHERE `album_rating_total` IS NULL; UPDATE `gallery_albums` SET `album_position`=0 WHERE `album_position` IS NULL; UPDATE `gallery_albums` SET `album_count_reviews`=0 WHERE `album_count_reviews` IS NULL; UPDATE `gallery_albums` SET `album_count_reviews_hidden`=0 WHERE `album_count_reviews_hidden` IS NULL; UPDATE `gallery_albums` SET `album_comments`=0 WHERE `album_comments` IS NULL; UPDATE `gallery_albums` SET `album_comments_hidden`=0 WHERE `album_comments_hidden` IS NULL; UPDATE `gallery_albums` SET `album_comments_unapproved`=0 WHERE `album_comments_unapproved` IS NULL; UPDATE `gallery_albums` SET `album_reviews`=0 WHERE `album_reviews` IS NULL; UPDATE `gallery_albums` SET `album_reviews_hidden`=0 WHERE `album_reviews_hidden` IS NULL; UPDATE `gallery_albums` SET `album_reviews_unapproved`=0 WHERE `album_reviews_unapproved` IS NULL; UPDATE `gallery_albums` SET `album_locked`=0 WHERE `album_locked` IS NULL; UPDATE `gallery_albums` SET `album_featured`=0 WHERE `album_featured` IS NULL; UPDATE `gallery_albums` SET `album_submit_type`=0 WHERE `album_submit_type` IS NULL; ALTER TABLE `gallery_albums` CHANGE COLUMN `album_id` `album_id` BIGINT (20) NOT NULL AUTO_INCREMENT , DROP INDEX `album_parent_id`, DROP INDEX `album_table`, CHANGE COLUMN `album_category_id` `album_category_id` INT (10) NOT NULL DEFAULT 0 , ADD KEY `album_parent_id` (`album_category_id`,`album_name_seo`(181)), ADD KEY `album_table` (`album_category_id`,`album_type`,`album_name`(170)), CHANGE COLUMN `album_owner_id` `album_owner_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_type` `album_type` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_count_imgs` `album_count_imgs` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_count_comments` `album_count_comments` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_count_imgs_hidden` `album_count_imgs_hidden` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_count_comments_hidden` `album_count_comments_hidden` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_cover_img_id` `album_cover_img_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_last_img_id` `album_last_img_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_last_img_date` `album_last_img_date` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_allow_comments` `album_allow_comments` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_allow_rating` `album_allow_rating` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_rating_count` `album_rating_count` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_rating_total` `album_rating_total` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_position` `album_position` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_allowed_access` `album_allowed_access` BIGINT (20) UNSIGNED NULL COMMENT 'Holds the social group ID (core_sys_social_groups)', CHANGE COLUMN `album_allow_reviews` `album_allow_reviews` TINYINT (4) NULL DEFAULT 0 , CHANGE COLUMN `album_count_reviews` `album_count_reviews` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_count_reviews_hidden` `album_count_reviews_hidden` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `album_comments` `album_comments` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `album_comments_hidden` `album_comments_hidden` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `album_comments_unapproved` `album_comments_unapproved` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `album_reviews` `album_reviews` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `album_reviews_hidden` `album_reviews_hidden` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `album_reviews_unapproved` `album_reviews_unapproved` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `album_last_comment` `album_last_comment` INT (10) UNSIGNED NULL , CHANGE COLUMN `album_last_review` `album_last_review` INT (10) UNSIGNED NULL , CHANGE COLUMN `album_locked` `album_locked` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `album_featured` `album_featured` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `album_submit_type` `album_submit_type` INT (10) NOT NULL DEFAULT 0 COMMENT 'Submission type. 0=owner only, 1=anyone, 2=specific groups, 3=specific members, 4=club'; UPDATE `gallery_bandwidth` SET `bid`='' WHERE `bid` IS NULL; UPDATE `gallery_bandwidth` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `gallery_bandwidth` SET `bdate`=0 WHERE `bdate` IS NULL; UPDATE `gallery_bandwidth` SET `bsize`=0 WHERE `bsize` IS NULL; UPDATE `gallery_bandwidth` SET `image_id`=0 WHERE `image_id` IS NULL; ALTER TABLE `gallery_bandwidth` CHANGE COLUMN `bid` `bid` BIGINT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `bdate` `bdate` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `bsize` `bsize` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `image_id` `image_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `gallery_categories` SET `category_id`='' WHERE `category_id` IS NULL; UPDATE `gallery_categories` SET `category_parent_id`=0 WHERE `category_parent_id` IS NULL; UPDATE `gallery_categories` SET `category_count_imgs`=0 WHERE `category_count_imgs` IS NULL; UPDATE `gallery_categories` SET `category_count_comments`=0 WHERE `category_count_comments` IS NULL; UPDATE `gallery_categories` SET `category_count_imgs_hidden`=0 WHERE `category_count_imgs_hidden` IS NULL; UPDATE `gallery_categories` SET `category_count_comments_hidden`=0 WHERE `category_count_comments_hidden` IS NULL; UPDATE `gallery_categories` SET `category_cover_img_id`=0 WHERE `category_cover_img_id` IS NULL; UPDATE `gallery_categories` SET `category_last_img_id`=0 WHERE `category_last_img_id` IS NULL; UPDATE `gallery_categories` SET `category_last_img_date`=0 WHERE `category_last_img_date` IS NULL; UPDATE `gallery_categories` SET `category_allow_comments`=0 WHERE `category_allow_comments` IS NULL; UPDATE `gallery_categories` SET `category_allow_rating`=0 WHERE `category_allow_rating` IS NULL; UPDATE `gallery_categories` SET `category_approve_img`=0 WHERE `category_approve_img` IS NULL; UPDATE `gallery_categories` SET `category_approve_com`=0 WHERE `category_approve_com` IS NULL; UPDATE `gallery_categories` SET `category_rating_aggregate`=0 WHERE `category_rating_aggregate` IS NULL; UPDATE `gallery_categories` SET `category_rating_count`=0 WHERE `category_rating_count` IS NULL; UPDATE `gallery_categories` SET `category_rating_total`=0 WHERE `category_rating_total` IS NULL; UPDATE `gallery_categories` SET `category_watermark`=0 WHERE `category_watermark` IS NULL; UPDATE `gallery_categories` SET `category_position`=0 WHERE `category_position` IS NULL; UPDATE `gallery_categories` SET `category_can_tag`=0 WHERE `category_can_tag` IS NULL; UPDATE `gallery_categories` SET `category_public_albums`=0 WHERE `category_public_albums` IS NULL; UPDATE `gallery_categories` SET `category_nonpublic_albums`=0 WHERE `category_nonpublic_albums` IS NULL; UPDATE `gallery_categories` SET `category_tag_prefixes`=0 WHERE `category_tag_prefixes` IS NULL; UPDATE `gallery_categories` SET `category_allow_albums`=1 WHERE `category_allow_albums` IS NULL; UPDATE `gallery_categories` SET `category_show_rules`=0 WHERE `category_show_rules` IS NULL; UPDATE `gallery_categories` SET `category_allow_reviews`=0 WHERE `category_allow_reviews` IS NULL; UPDATE `gallery_categories` SET `category_review_moderate`=0 WHERE `category_review_moderate` IS NULL; ALTER TABLE `gallery_categories` CHANGE COLUMN `category_id` `category_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `category_parent_id` `category_parent_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_count_imgs` `category_count_imgs` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_count_comments` `category_count_comments` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_count_imgs_hidden` `category_count_imgs_hidden` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_count_comments_hidden` `category_count_comments_hidden` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_cover_img_id` `category_cover_img_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_last_img_id` `category_last_img_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_last_img_date` `category_last_img_date` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_allow_comments` `category_allow_comments` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_allow_rating` `category_allow_rating` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_approve_img` `category_approve_img` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_approve_com` `category_approve_com` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_rating_aggregate` `category_rating_aggregate` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_rating_count` `category_rating_count` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_rating_total` `category_rating_total` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_watermark` `category_watermark` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_position` `category_position` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_can_tag` `category_can_tag` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_public_albums` `category_public_albums` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_nonpublic_albums` `category_nonpublic_albums` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_tag_prefixes` `category_tag_prefixes` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `category_allow_albums` `category_allow_albums` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `category_show_rules` `category_show_rules` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `category_allow_reviews` `category_allow_reviews` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_review_moderate` `category_review_moderate` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `category_club_id` `category_club_id` BIGINT (20) UNSIGNED NULL COMMENT 'The club ID if this category belongs to a club, or NULL'; UPDATE `gallery_comments` SET `comment_id`='' WHERE `comment_id` IS NULL; UPDATE `gallery_comments` SET `comment_edit_time`=0 WHERE `comment_edit_time` IS NULL; UPDATE `gallery_comments` SET `comment_author_id`=0 WHERE `comment_author_id` IS NULL; UPDATE `gallery_comments` SET `comment_post_date`=0 WHERE `comment_post_date` IS NULL; UPDATE `gallery_comments` SET `comment_approved`=0 WHERE `comment_approved` IS NULL; UPDATE `gallery_comments` SET `comment_img_id`=0 WHERE `comment_img_id` IS NULL; UPDATE `gallery_comments` SET `comment_append_edit`=0 WHERE `comment_append_edit` IS NULL; ALTER TABLE `gallery_comments` CHANGE COLUMN `comment_id` `comment_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `comment_edit_time` `comment_edit_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_author_id` `comment_author_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_post_date` `comment_post_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_approved` `comment_approved` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_img_id` `comment_img_id` BIGINT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_append_edit` `comment_append_edit` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `gallery_images` SET `image_id`='' WHERE `image_id` IS NULL; UPDATE `gallery_images` SET `image_member_id`=0 WHERE `image_member_id` IS NULL; UPDATE `gallery_images` SET `image_category_id`=0 WHERE `image_category_id` IS NULL; UPDATE `gallery_images` SET `image_album_id`=0 WHERE `image_album_id` IS NULL; UPDATE `gallery_images` SET `image_file_size`=0 WHERE `image_file_size` IS NULL; UPDATE `gallery_images` SET `image_views`=0 WHERE `image_views` IS NULL; UPDATE `gallery_images` SET `image_comments`=0 WHERE `image_comments` IS NULL; UPDATE `gallery_images` SET `image_comments_queued`=0 WHERE `image_comments_queued` IS NULL; UPDATE `gallery_images` SET `image_date`=0 WHERE `image_date` IS NULL; UPDATE `gallery_images` SET `image_ratings_total`=0 WHERE `image_ratings_total` IS NULL; UPDATE `gallery_images` SET `image_ratings_count`=0 WHERE `image_ratings_count` IS NULL; UPDATE `gallery_images` SET `image_last_comment`=0 WHERE `image_last_comment` IS NULL; UPDATE `gallery_images` SET `image_privacy`=0 WHERE `image_privacy` IS NULL; UPDATE `gallery_images` SET `image_locked`=0 WHERE `image_locked` IS NULL; UPDATE `gallery_images` SET `image_reviews`=0 WHERE `image_reviews` IS NULL; UPDATE `gallery_images` SET `image_hidden_reviews`=0 WHERE `image_hidden_reviews` IS NULL; UPDATE `gallery_images` SET `image_unapproved_reviews`=0 WHERE `image_unapproved_reviews` IS NULL; ALTER TABLE `gallery_images` CHANGE COLUMN `image_id` `image_id` BIGINT (20) NOT NULL AUTO_INCREMENT , DROP INDEX `cmt_lookup`, CHANGE COLUMN `image_member_id` `image_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , ADD KEY `cmt_lookup` (`image_privacy`,`image_member_id`,`image_parent_permission`(129),`image_album_id`,`image_approved`,`image_last_comment`), CHANGE COLUMN `image_category_id` `image_category_id` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_album_id` `image_album_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_file_size` `image_file_size` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_views` `image_views` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_comments` `image_comments` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_comments_queued` `image_comments_queued` INT (10) NOT NULL DEFAULT 0 , DROP INDEX `gb_select`, CHANGE COLUMN `image_date` `image_date` INT (10) NOT NULL DEFAULT 0 , ADD KEY `gb_select` (`image_approved`,`image_parent_permission`(180),`image_date`), CHANGE COLUMN `image_ratings_total` `image_ratings_total` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_ratings_count` `image_ratings_count` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_last_comment` `image_last_comment` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_privacy` `image_privacy` INT (11) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_updated` `image_updated` INT (10) UNSIGNED NULL , CHANGE COLUMN `image_approved_by` `image_approved_by` BIGINT (20) UNSIGNED NULL COMMENT 'The member ID who approved the image', CHANGE COLUMN `image_approved_on` `image_approved_on` INT (10) UNSIGNED NULL COMMENT 'Timestamp image was approved at', CHANGE COLUMN `image_locked` `image_locked` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `image_hidden_comments` `image_hidden_comments` INT (10) UNSIGNED NULL , CHANGE COLUMN `image_unapproved_comments` `image_unapproved_comments` INT (10) UNSIGNED NULL , CHANGE COLUMN `image_reviews` `image_reviews` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_hidden_reviews` `image_hidden_reviews` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `image_unapproved_reviews` `image_unapproved_reviews` INT (10) NOT NULL DEFAULT 0 ; UPDATE `gallery_images_uploads` SET `upload_member_id`=0 WHERE `upload_member_id` IS NULL; UPDATE `gallery_images_uploads` SET `upload_date`=0 WHERE `upload_date` IS NULL; UPDATE `gallery_images_uploads` SET `upload_unique_id`='' WHERE `upload_unique_id` IS NULL; ALTER TABLE `gallery_images_uploads` CHANGE COLUMN `upload_member_id` `upload_member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `upload_date` `upload_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `upload_unique_id` `upload_unique_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `upload_order` `upload_order` INT (10) UNSIGNED NULL ; UPDATE `gallery_reviews` SET `review_id`='' WHERE `review_id` IS NULL; UPDATE `gallery_reviews` SET `review_author`=0 WHERE `review_author` IS NULL; UPDATE `gallery_reviews` SET `review_date`=0 WHERE `review_date` IS NULL; UPDATE `gallery_reviews` SET `review_edit_time`=0 WHERE `review_edit_time` IS NULL; UPDATE `gallery_reviews` SET `review_edit_show`=0 WHERE `review_edit_show` IS NULL; UPDATE `gallery_reviews` SET `review_rating`=0 WHERE `review_rating` IS NULL; UPDATE `gallery_reviews` SET `review_votes_total`=0 WHERE `review_votes_total` IS NULL; UPDATE `gallery_reviews` SET `review_votes_helpful`=0 WHERE `review_votes_helpful` IS NULL; UPDATE `gallery_reviews` SET `review_approved`=0 WHERE `review_approved` IS NULL; UPDATE `gallery_reviews` SET `review_image_id`=0 WHERE `review_image_id` IS NULL; ALTER TABLE `gallery_reviews` CHANGE COLUMN `review_id` `review_id` BIGINT (20) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `review_author` `review_author` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `review_date` `review_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_edit_time` `review_edit_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_edit_show` `review_edit_show` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_rating` `review_rating` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_votes_total` `review_votes_total` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_votes_helpful` `review_votes_helpful` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_approved` `review_approved` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_image_id` `review_image_id` INT (10) NOT NULL DEFAULT 0 ; UPDATE `gallery_album_comments` SET `comment_id`='' WHERE `comment_id` IS NULL; UPDATE `gallery_album_comments` SET `comment_edit_time`=0 WHERE `comment_edit_time` IS NULL; UPDATE `gallery_album_comments` SET `comment_author_id`=0 WHERE `comment_author_id` IS NULL; UPDATE `gallery_album_comments` SET `comment_post_date`=0 WHERE `comment_post_date` IS NULL; UPDATE `gallery_album_comments` SET `comment_approved`=0 WHERE `comment_approved` IS NULL; UPDATE `gallery_album_comments` SET `comment_album_id`=0 WHERE `comment_album_id` IS NULL; UPDATE `gallery_album_comments` SET `comment_append_edit`=0 WHERE `comment_append_edit` IS NULL; ALTER TABLE `gallery_album_comments` CHANGE COLUMN `comment_id` `comment_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `comment_edit_time` `comment_edit_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_author_id` `comment_author_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_post_date` `comment_post_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_approved` `comment_approved` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_album_id` `comment_album_id` BIGINT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `comment_append_edit` `comment_append_edit` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `gallery_album_reviews` SET `review_id`='' WHERE `review_id` IS NULL; UPDATE `gallery_album_reviews` SET `review_author`=0 WHERE `review_author` IS NULL; UPDATE `gallery_album_reviews` SET `review_date`=0 WHERE `review_date` IS NULL; UPDATE `gallery_album_reviews` SET `review_edit_time`=0 WHERE `review_edit_time` IS NULL; UPDATE `gallery_album_reviews` SET `review_edit_show`=0 WHERE `review_edit_show` IS NULL; UPDATE `gallery_album_reviews` SET `review_rating`=0 WHERE `review_rating` IS NULL; UPDATE `gallery_album_reviews` SET `review_votes_total`=0 WHERE `review_votes_total` IS NULL; UPDATE `gallery_album_reviews` SET `review_votes_helpful`=0 WHERE `review_votes_helpful` IS NULL; UPDATE `gallery_album_reviews` SET `review_approved`=0 WHERE `review_approved` IS NULL; UPDATE `gallery_album_reviews` SET `review_album_id`=0 WHERE `review_album_id` IS NULL; ALTER TABLE `gallery_album_reviews` CHANGE COLUMN `review_id` `review_id` BIGINT (20) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `review_author` `review_author` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_date` `review_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_edit_time` `review_edit_time` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_edit_show` `review_edit_show` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_rating` `review_rating` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_votes_total` `review_votes_total` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_votes_helpful` `review_votes_helpful` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_approved` `review_approved` INT (1) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_album_id` `review_album_id` INT (10) NOT NULL DEFAULT 0 ; ALTER TABLE `core_groups` CHANGE COLUMN `g_create_albums` `g_create_albums` TINYINT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Can create albums?' ALTER TABLE `core_groups` CHANGE COLUMN `g_create_albums_private` `g_create_albums_private` TINYINT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Can create private albums?' ALTER TABLE `core_groups` CHANGE COLUMN `g_create_albums_fo` `g_create_albums_fo` TINYINT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Can create restricted albums?' ALTER TABLE `core_groups` CHANGE COLUMN `g_album_limit` `g_album_limit` INT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Maximum number of albums' ALTER TABLE `core_groups` CHANGE COLUMN `g_img_album_limit` `g_img_album_limit` INT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Maximum number of images per album' ALTER TABLE `core_groups` CHANGE COLUMN `g_movies` `g_movies` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can upload movies?' ALTER TABLE `core_groups` CHANGE COLUMN `g_movie_size` `g_movie_size` INT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Maximum size of movies' ALTER TABLE `core_groups` CHANGE COLUMN `g_max_upload` `g_max_upload` INT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Maximum image upload size' ALTER TABLE `core_groups` CHANGE COLUMN `g_max_transfer` `g_max_transfer` INT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Maximum bandwidth consumption' ALTER TABLE `core_groups` CHANGE COLUMN `g_max_views` `g_max_views` INT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Maximum daily image views' ALTER TABLE `core_groups` CHANGE COLUMN `g_download_original` `g_download_original` TINYINT (1) UNSIGNED NULL DEFAULT 0 COMMENT 'Can this group download the original image?' UPDATE `convert_apps` SET `app_id`='' WHERE `app_id` IS NULL; UPDATE `convert_apps` SET `parent`=0 WHERE `parent` IS NULL; UPDATE `convert_apps` SET `start_date`=0 WHERE `start_date` IS NULL; UPDATE `convert_apps` SET `db_port`=3306 WHERE `db_port` IS NULL; ALTER TABLE `convert_apps` CHANGE COLUMN `app_id` `app_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `parent` `parent` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `start_date` `start_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `db_port` `db_port` INT (10) NOT NULL DEFAULT 3306 ; UPDATE `convert_link` SET `link_id`='' WHERE `link_id` IS NULL; UPDATE `convert_link` SET `ipb_id`=0 WHERE `ipb_id` IS NULL; UPDATE `convert_link` SET `app`=0 WHERE `app` IS NULL; ALTER TABLE `convert_link` CHANGE COLUMN `link_id` `link_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `ipb_id` `ipb_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `app` `app` INT (10) NOT NULL DEFAULT 0 ; UPDATE `convert_link_pms` SET `link_id`='' WHERE `link_id` IS NULL; UPDATE `convert_link_pms` SET `ipb_id`=0 WHERE `ipb_id` IS NULL; UPDATE `convert_link_pms` SET `app`=0 WHERE `app` IS NULL; ALTER TABLE `convert_link_pms` CHANGE COLUMN `link_id` `link_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `ipb_id` `ipb_id` BIGINT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `app` `app` INT (10) NOT NULL DEFAULT 0 ; UPDATE `convert_link_posts` SET `link_id`='' WHERE `link_id` IS NULL; UPDATE `convert_link_posts` SET `ipb_id`=0 WHERE `ipb_id` IS NULL; UPDATE `convert_link_posts` SET `app`=0 WHERE `app` IS NULL; ALTER TABLE `convert_link_posts` CHANGE COLUMN `link_id` `link_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `ipb_id` `ipb_id` BIGINT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `app` `app` INT (10) NOT NULL DEFAULT 0 ; UPDATE `convert_link_topics` SET `link_id`='' WHERE `link_id` IS NULL; UPDATE `convert_link_topics` SET `ipb_id`=0 WHERE `ipb_id` IS NULL; UPDATE `convert_link_topics` SET `app`=0 WHERE `app` IS NULL; ALTER TABLE `convert_link_topics` CHANGE COLUMN `link_id` `link_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `ipb_id` `ipb_id` BIGINT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `app` `app` INT (10) NOT NULL DEFAULT 0 ; UPDATE `convert_logs` SET `log_id`='' WHERE `log_id` IS NULL; UPDATE `convert_logs` SET `log_app`=0 WHERE `log_app` IS NULL; UPDATE `convert_logs` SET `log_time`=0 WHERE `log_time` IS NULL; ALTER TABLE `convert_logs` CHANGE COLUMN `log_id` `log_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `log_app` `log_app` BIGINT (20) NOT NULL DEFAULT 0 COMMENT 'The conversion app.', CHANGE COLUMN `log_time` `log_time` INT (10) NOT NULL DEFAULT 0 ; UPDATE `convert_app_sessions` SET `session_app_id`=0 WHERE `session_app_id` IS NULL; ALTER TABLE `convert_app_sessions` CHANGE COLUMN `session_app_id` `session_app_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ID Number'; UPDATE `convert_custom_bbcode` SET `bbcode_id`='' WHERE `bbcode_id` IS NULL; UPDATE `convert_custom_bbcode` SET `bbcode_switch_option`=0 WHERE `bbcode_switch_option` IS NULL; ALTER TABLE `convert_custom_bbcode` CHANGE COLUMN `bbcode_id` `bbcode_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `bbcode_switch_option` `bbcode_switch_option` INT (1) NOT NULL DEFAULT 0 ; UPDATE `convert_bbcode_mediatag` SET `mediatag_id`='' WHERE `mediatag_id` IS NULL; UPDATE `convert_bbcode_mediatag` SET `mediatag_position`=0 WHERE `mediatag_position` IS NULL; ALTER TABLE `convert_bbcode_mediatag` CHANGE COLUMN `mediatag_id` `mediatag_id` SMALLINT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `mediatag_position` `mediatag_position` SMALLINT (6) NOT NULL DEFAULT 0 ; UPDATE `nexus_invoices` SET `i_id`='' WHERE `i_id` IS NULL; UPDATE `nexus_invoices` SET `i_member`=0 WHERE `i_member` IS NULL; UPDATE `nexus_invoices` SET `i_date`=0 WHERE `i_date` IS NULL; UPDATE `nexus_invoices` SET `i_paid`=0 WHERE `i_paid` IS NULL; UPDATE `nexus_invoices` SET `i_discount`=0 WHERE `i_discount` IS NULL; ALTER TABLE `nexus_invoices` CHANGE COLUMN `i_id` `i_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `i_member` `i_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `i_date` `i_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `i_paid` `i_paid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `i_discount` `i_discount` SMALLINT (2) NOT NULL DEFAULT 0 ; UPDATE `nexus_transactions` SET `t_id`='' WHERE `t_id` IS NULL; UPDATE `nexus_transactions` SET `t_member`=0 WHERE `t_member` IS NULL; UPDATE `nexus_transactions` SET `t_invoice`=0 WHERE `t_invoice` IS NULL; UPDATE `nexus_transactions` SET `t_method`=0 WHERE `t_method` IS NULL; UPDATE `nexus_transactions` SET `t_date`=0 WHERE `t_date` IS NULL; UPDATE `nexus_transactions` SET `t_fraud_blocked`=0 WHERE `t_fraud_blocked` IS NULL; ALTER TABLE `nexus_transactions` CHANGE COLUMN `t_id` `t_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `t_member` `t_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `t_invoice` `t_invoice` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `t_method` `t_method` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `t_date` `t_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `t_fraud_blocked` `t_fraud_blocked` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `t_auth` `t_auth` INT (10) NULL COMMENT 'If authorised but not captured, the auth date', CHANGE COLUMN `t_billing_agreement` `t_billing_agreement` BIGINT (20) UNSIGNED NULL COMMENT 'If the transaction is part of a billing agreement, its ID'; UPDATE `nexus_paymethods` SET `m_id`='' WHERE `m_id` IS NULL; UPDATE `nexus_paymethods` SET `m_position`=0 WHERE `m_position` IS NULL; ALTER TABLE `nexus_paymethods` CHANGE COLUMN `m_id` `m_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `m_position` `m_position` INT (5) NOT NULL DEFAULT 0 ; UPDATE `nexus_customer_addresses` SET `id`='' WHERE `id` IS NULL; UPDATE `nexus_customer_addresses` SET `member`='' WHERE `member` IS NULL; UPDATE `nexus_customer_addresses` SET `primary_billing`=0 WHERE `primary_billing` IS NULL; UPDATE `nexus_customer_addresses` SET `primary_shipping`=0 WHERE `primary_shipping` IS NULL; ALTER TABLE `nexus_customer_addresses` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `member` `member` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The member ID', CHANGE COLUMN `primary_billing` `primary_billing` INT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Is the primary billing address?', CHANGE COLUMN `primary_shipping` `primary_shipping` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Is the primary shipping address?', CHANGE COLUMN `added` `added` INT (10) UNSIGNED NULL COMMENT 'Unix timestamp of when added'; UPDATE `nexus_customers` SET `member_id`=0 WHERE `member_id` IS NULL; ALTER TABLE `nexus_customers` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `nexus_tax` SET `t_id`='' WHERE `t_id` IS NULL; UPDATE `nexus_tax` SET `t_order`=0 WHERE `t_order` IS NULL; ALTER TABLE `nexus_tax` CHANGE COLUMN `t_id` `t_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `t_order` `t_order` INT (5) NOT NULL DEFAULT 0 ; UPDATE `nexus_purchases` SET `ps_id`='' WHERE `ps_id` IS NULL; UPDATE `nexus_purchases` SET `ps_member`=0 WHERE `ps_member` IS NULL; UPDATE `nexus_purchases` SET `ps_start`=0 WHERE `ps_start` IS NULL; UPDATE `nexus_purchases` SET `ps_expire`=0 WHERE `ps_expire` IS NULL; UPDATE `nexus_purchases` SET `ps_renewals`=0 WHERE `ps_renewals` IS NULL; UPDATE `nexus_purchases` SET `ps_item_id`=0 WHERE `ps_item_id` IS NULL; UPDATE `nexus_purchases` SET `ps_parent`=0 WHERE `ps_parent` IS NULL; UPDATE `nexus_purchases` SET `ps_invoice_pending`=0 WHERE `ps_invoice_pending` IS NULL; UPDATE `nexus_purchases` SET `ps_original_invoice`=0 WHERE `ps_original_invoice` IS NULL; UPDATE `nexus_purchases` SET `ps_tax`=0 WHERE `ps_tax` IS NULL; UPDATE `nexus_purchases` SET `ps_show`=1 WHERE `ps_show` IS NULL; UPDATE `nexus_purchases` SET `ps_grace_period`=0 WHERE `ps_grace_period` IS NULL; ALTER TABLE `nexus_purchases` CHANGE COLUMN `ps_id` `ps_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `ps_member` `ps_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `ps_start` `ps_start` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `ps_expire` `ps_expire` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `ps_renewals` `ps_renewals` INT (5) NOT NULL DEFAULT 0 , DROP INDEX `ps_purchases`, CHANGE COLUMN `ps_item_id` `ps_item_id` INT (10) NOT NULL DEFAULT 0 , ADD KEY `ps_purchases` (`ps_app`(90),`ps_type`(90),`ps_item_id`), CHANGE COLUMN `ps_parent` `ps_parent` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `ps_invoice_pending` `ps_invoice_pending` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `ps_pay_to` `ps_pay_to` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `ps_commission` `ps_commission` INT (2) NULL , CHANGE COLUMN `ps_original_invoice` `ps_original_invoice` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `ps_tax` `ps_tax` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `ps_show` `ps_show` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `ps_grace_period` `ps_grace_period` INT (10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Grace period in seconds', CHANGE COLUMN `ps_billing_agreement` `ps_billing_agreement` BIGINT (20) UNSIGNED NULL COMMENT 'If paid by a billing agreement, its ID'; UPDATE `nexus_shipping` SET `s_id`='' WHERE `s_id` IS NULL; UPDATE `nexus_shipping` SET `s_tax`=0 WHERE `s_tax` IS NULL; UPDATE `nexus_shipping` SET `s_order`=0 WHERE `s_order` IS NULL; ALTER TABLE `nexus_shipping` CHANGE COLUMN `s_id` `s_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `s_tax` `s_tax` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `s_order` `s_order` INT (5) NOT NULL DEFAULT 0 ; UPDATE `nexus_fraud_rules` SET `f_id`='' WHERE `f_id` IS NULL; ALTER TABLE `nexus_fraud_rules` CHANGE COLUMN `f_id` `f_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `f_trans_okay_unit` `f_trans_okay_unit` INT (3) NULL , CHANGE COLUMN `f_trans_fraud_unit` `f_trans_fraud_unit` INT (3) NULL , CHANGE COLUMN `f_order` `f_order` INT (10) NULL , CHANGE COLUMN `f_customer_reg_unit` `f_customer_reg_unit` INT (3) UNSIGNED NULL , CHANGE COLUMN `f_last_okay_trans_unit` `f_last_okay_trans_unit` INT (3) UNSIGNED NULL , CHANGE COLUMN `f_trans_fail_unit` `f_trans_fail_unit` INT (3) NULL ; UPDATE `nexus_customer_cards` SET `card_id`='' WHERE `card_id` IS NULL; UPDATE `nexus_customer_cards` SET `card_member`='' WHERE `card_member` IS NULL; UPDATE `nexus_customer_cards` SET `card_method`='' WHERE `card_method` IS NULL; ALTER TABLE `nexus_customer_cards` CHANGE COLUMN `card_id` `card_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `card_member` `card_member` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The member ID', CHANGE COLUMN `card_method` `card_method` INT (10) UNSIGNED NOT NULL COMMENT 'The payment method ID'; UPDATE `nexus_ship_orders` SET `o_id`='' WHERE `o_id` IS NULL; UPDATE `nexus_ship_orders` SET `o_invoice`=0 WHERE `o_invoice` IS NULL; UPDATE `nexus_ship_orders` SET `o_method`=0 WHERE `o_method` IS NULL; UPDATE `nexus_ship_orders` SET `o_date`=0 WHERE `o_date` IS NULL; UPDATE `nexus_ship_orders` SET `o_shipped_date`=0 WHERE `o_shipped_date` IS NULL; ALTER TABLE `nexus_ship_orders` CHANGE COLUMN `o_id` `o_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `o_invoice` `o_invoice` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `o_method` `o_method` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `o_date` `o_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `o_shipped_date` `o_shipped_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `nexus_payouts` SET `po_id`='' WHERE `po_id` IS NULL; UPDATE `nexus_payouts` SET `po_member`=0 WHERE `po_member` IS NULL; UPDATE `nexus_payouts` SET `po_date`=0 WHERE `po_date` IS NULL; ALTER TABLE `nexus_payouts` CHANGE COLUMN `po_id` `po_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `po_member` `po_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `po_date` `po_date` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `po_completed` `po_completed` INT (10) UNSIGNED NULL , CHANGE COLUMN `po_processed_by` `po_processed_by` BIGINT (20) UNSIGNED NULL ; UPDATE `nexus_support_replies` SET `reply_id`='' WHERE `reply_id` IS NULL; UPDATE `nexus_support_replies` SET `reply_request`=0 WHERE `reply_request` IS NULL; UPDATE `nexus_support_replies` SET `reply_member`=0 WHERE `reply_member` IS NULL; UPDATE `nexus_support_replies` SET `reply_date`=0 WHERE `reply_date` IS NULL; ALTER TABLE `nexus_support_replies` CHANGE COLUMN `reply_id` `reply_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `reply_request` `reply_request` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `reply_member` `reply_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `reply_date` `reply_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `nexus_support_requests` SET `r_id`='' WHERE `r_id` IS NULL; UPDATE `nexus_support_requests` SET `r_member`=0 WHERE `r_member` IS NULL; UPDATE `nexus_support_requests` SET `r_department`=0 WHERE `r_department` IS NULL; UPDATE `nexus_support_requests` SET `r_purchase`=0 WHERE `r_purchase` IS NULL; UPDATE `nexus_support_requests` SET `r_status`=0 WHERE `r_status` IS NULL; UPDATE `nexus_support_requests` SET `r_started`=0 WHERE `r_started` IS NULL; UPDATE `nexus_support_requests` SET `r_last_reply`=0 WHERE `r_last_reply` IS NULL; UPDATE `nexus_support_requests` SET `r_last_reply_by`=0 WHERE `r_last_reply_by` IS NULL; UPDATE `nexus_support_requests` SET `r_last_new_reply`=0 WHERE `r_last_new_reply` IS NULL; UPDATE `nexus_support_requests` SET `r_last_staff_reply`=0 WHERE `r_last_staff_reply` IS NULL; UPDATE `nexus_support_requests` SET `r_staff`=0 WHERE `r_staff` IS NULL; UPDATE `nexus_support_requests` SET `r_replies`=0 WHERE `r_replies` IS NULL; ALTER TABLE `nexus_support_requests` CHANGE COLUMN `r_id` `r_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `r_member` `r_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `r_department` `r_department` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `r_purchase` `r_purchase` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `r_status` `r_status` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `r_severity` `r_severity` INT (5) NULL DEFAULT 0 , CHANGE COLUMN `r_started` `r_started` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `r_last_reply` `r_last_reply` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `r_last_reply_by` `r_last_reply_by` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `r_last_new_reply` `r_last_new_reply` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `r_last_staff_reply` `r_last_staff_reply` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `r_staff` `r_staff` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `r_replies` `r_replies` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `r_ppi_invoice` `r_ppi_invoice` INT (10) UNSIGNED NULL ; UPDATE `nexus_support_departments` SET `dpt_id`='' WHERE `dpt_id` IS NULL; UPDATE `nexus_support_departments` SET `dpt_position`=0 WHERE `dpt_position` IS NULL; ALTER TABLE `nexus_support_departments` CHANGE COLUMN `dpt_id` `dpt_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `dpt_position` `dpt_position` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `dpt_ppi_tax` `dpt_ppi_tax` INT (5) UNSIGNED NULL ; UPDATE `nexus_support_statuses` SET `status_id`='' WHERE `status_id` IS NULL; UPDATE `nexus_support_statuses` SET `status_position`=0 WHERE `status_position` IS NULL; ALTER TABLE `nexus_support_statuses` CHANGE COLUMN `status_id` `status_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `status_position` `status_position` INT (5) NOT NULL DEFAULT 0 ; UPDATE `nexus_support_severities` SET `sev_id`='' WHERE `sev_id` IS NULL; ALTER TABLE `nexus_support_severities` CHANGE COLUMN `sev_id` `sev_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `sev_position` `sev_position` INT (5) NULL ; UPDATE `nexus_support_tracker` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `nexus_support_tracker` SET `request_id`=0 WHERE `request_id` IS NULL; ALTER TABLE `nexus_support_tracker` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `request_id` `request_id` INT (10) NOT NULL DEFAULT 0 ; UPDATE `nexus_support_views` SET `view_rid`=0 WHERE `view_rid` IS NULL; UPDATE `nexus_support_views` SET `view_member`=0 WHERE `view_member` IS NULL; ALTER TABLE `nexus_support_views` CHANGE COLUMN `view_rid` `view_rid` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `view_member` `view_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `view_first` `view_first` INT (10) NULL , CHANGE COLUMN `view_last` `view_last` INT (10) NULL , CHANGE COLUMN `view_reply` `view_reply` INT (10) NULL ; UPDATE `nexus_support_stock_actions` SET `action_id`='' WHERE `action_id` IS NULL; UPDATE `nexus_support_stock_actions` SET `action_department`=0 WHERE `action_department` IS NULL; UPDATE `nexus_support_stock_actions` SET `action_status`=0 WHERE `action_status` IS NULL; UPDATE `nexus_support_stock_actions` SET `action_staff`=0 WHERE `action_staff` IS NULL; UPDATE `nexus_support_stock_actions` SET `action_position`=0 WHERE `action_position` IS NULL; ALTER TABLE `nexus_support_stock_actions` CHANGE COLUMN `action_id` `action_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `action_department` `action_department` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `action_status` `action_status` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `action_staff` `action_staff` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `action_position` `action_position` INT (5) NOT NULL DEFAULT 0 ; UPDATE `nexus_support_fields` SET `sf_id`='' WHERE `sf_id` IS NULL; UPDATE `nexus_support_fields` SET `sf_position`=0 WHERE `sf_position` IS NULL; UPDATE `nexus_support_fields` SET `sf_max_input`=0 WHERE `sf_max_input` IS NULL; UPDATE `nexus_support_fields` SET `sf_validate`=1 WHERE `sf_validate` IS NULL; UPDATE `nexus_support_fields` SET `sf_allow_attachments`=1 WHERE `sf_allow_attachments` IS NULL; ALTER TABLE `nexus_support_fields` CHANGE COLUMN `sf_id` `sf_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `sf_position` `sf_position` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `sf_max_input` `sf_max_input` SMALLINT (6) NOT NULL DEFAULT 0 , CHANGE COLUMN `sf_validate` `sf_validate` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 , CHANGE COLUMN `sf_allow_attachments` `sf_allow_attachments` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 ; UPDATE `nexus_support_ratings` SET `rating_reply`=0 WHERE `rating_reply` IS NULL; ALTER TABLE `nexus_support_ratings` CHANGE COLUMN `rating_reply` `rating_reply` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `rating_rating` `rating_rating` SMALLINT (1) NULL , CHANGE COLUMN `rating_from` `rating_from` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `rating_staff` `rating_staff` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `rating_date` `rating_date` INT (10) NULL ; UPDATE `nexus_support_notify` SET `staff_id`=0 WHERE `staff_id` IS NULL; ALTER TABLE `nexus_support_notify` CHANGE COLUMN `staff_id` `staff_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'The staff member ID'; UPDATE `nexus_package_groups` SET `pg_id`='' WHERE `pg_id` IS NULL; UPDATE `nexus_package_groups` SET `pg_position`=0 WHERE `pg_position` IS NULL; UPDATE `nexus_package_groups` SET `pg_parent`=0 WHERE `pg_parent` IS NULL; ALTER TABLE `nexus_package_groups` CHANGE COLUMN `pg_id` `pg_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `pg_position` `pg_position` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `pg_parent` `pg_parent` INT (5) NOT NULL DEFAULT 0 ; UPDATE `nexus_packages` SET `p_id`='' WHERE `p_id` IS NULL; UPDATE `nexus_packages` SET `p_group`=0 WHERE `p_group` IS NULL; UPDATE `nexus_packages` SET `p_stock`=0 WHERE `p_stock` IS NULL; UPDATE `nexus_packages` SET `p_tax`=0 WHERE `p_tax` IS NULL; UPDATE `nexus_packages` SET `p_renewal_days`=0 WHERE `p_renewal_days` IS NULL; UPDATE `nexus_packages` SET `p_primary_group`=0 WHERE `p_primary_group` IS NULL; UPDATE `nexus_packages` SET `p_return_primary`=0 WHERE `p_return_primary` IS NULL; UPDATE `nexus_packages` SET `p_return_secondary`=0 WHERE `p_return_secondary` IS NULL; UPDATE `nexus_packages` SET `p_position`=0 WHERE `p_position` IS NULL; UPDATE `nexus_packages` SET `p_support_department`=0 WHERE `p_support_department` IS NULL; UPDATE `nexus_packages` SET `p_custom`=0 WHERE `p_custom` IS NULL; UPDATE `nexus_packages` SET `p_date_added`=0 WHERE `p_date_added` IS NULL; UPDATE `nexus_packages` SET `p_reviews`=0 WHERE `p_reviews` IS NULL; ALTER TABLE `nexus_packages` CHANGE COLUMN `p_id` `p_id` INT (8) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `p_group` `p_group` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_stock` `p_stock` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_tax` `p_tax` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_renewal_days` `p_renewal_days` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_primary_group` `p_primary_group` MEDIUMINT (8) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_return_primary` `p_return_primary` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_return_secondary` `p_return_secondary` TINYINT (4) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_position` `p_position` INT (8) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_support_department` `p_support_department` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_support_severity` `p_support_severity` INT (5) NULL , CHANGE COLUMN `p_custom` `p_custom` MEDIUMINT (8) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_renewal_days_advance` `p_renewal_days_advance` INT (11) NULL , CHANGE COLUMN `p_date_added` `p_date_added` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `p_reviews` `p_reviews` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_unapproved_reviews` `p_unapproved_reviews` INT (10) UNSIGNED NULL , CHANGE COLUMN `p_hidden_reviews` `p_hidden_reviews` INT (10) UNSIGNED NULL , CHANGE COLUMN `p_grace_period` `p_grace_period` INT (10) UNSIGNED NULL DEFAULT 0 COMMENT 'Grace period in days', CHANGE COLUMN `p_date_updated` `p_date_updated` INT (10) UNSIGNED NULL DEFAULT 0 ; UPDATE `nexus_packages_products` SET `p_id`=0 WHERE `p_id` IS NULL; ALTER TABLE `nexus_packages_products` CHANGE COLUMN `p_id` `p_id` INT (8) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_lkey_uses` `p_lkey_uses` INT (5) NULL ; ALTER TABLE `nexus_licensekeys` CHANGE COLUMN `lkey_purchase` `lkey_purchase` INT (10) NULL , CHANGE COLUMN `lkey_member` `lkey_member` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `lkey_uses` `lkey_uses` INT (5) NULL , CHANGE COLUMN `lkey_max_uses` `lkey_max_uses` INT (5) NULL , CHANGE COLUMN `lkey_generated` `lkey_generated` INT (10) NULL ; UPDATE `nexus_package_fields` SET `cf_id`='' WHERE `cf_id` IS NULL; UPDATE `nexus_package_fields` SET `cf_position`=0 WHERE `cf_position` IS NULL; UPDATE `nexus_package_fields` SET `cf_multiple`=0 WHERE `cf_multiple` IS NULL; ALTER TABLE `nexus_package_fields` CHANGE COLUMN `cf_id` `cf_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `cf_position` `cf_position` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `cf_multiple` `cf_multiple` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `nexus_product_options` SET `opt_id`='' WHERE `opt_id` IS NULL; ALTER TABLE `nexus_product_options` CHANGE COLUMN `opt_id` `opt_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `opt_package` `opt_package` INT (8) NULL , CHANGE COLUMN `opt_stock` `opt_stock` INT (10) NULL ; UPDATE `nexus_reviews` SET `review_id`='' WHERE `review_id` IS NULL; UPDATE `nexus_reviews` SET `review_product`=0 WHERE `review_product` IS NULL; UPDATE `nexus_reviews` SET `review_edit_show`=0 WHERE `review_edit_show` IS NULL; ALTER TABLE `nexus_reviews` CHANGE COLUMN `review_id` `review_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `review_product` `review_product` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `review_author_id` `review_author_id` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `review_date` `review_date` INT (10) NULL , CHANGE COLUMN `review_edit_date` `review_edit_date` INT (1) NULL DEFAULT 0 , CHANGE COLUMN `review_approved` `review_approved` INT (1) NULL DEFAULT 0 , CHANGE COLUMN `review_rating` `review_rating` SMALLINT (1) NULL , CHANGE COLUMN `review_useful` `review_useful` INT (5) NULL , CHANGE COLUMN `review_votes` `review_votes` INT (5) NULL , CHANGE COLUMN `review_edit_show` `review_edit_show` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `review_edit_member_id` `review_edit_member_id` BIGINT (20) UNSIGNED NULL ; UPDATE `nexus_package_images` SET `image_id`='' WHERE `image_id` IS NULL; ALTER TABLE `nexus_package_images` CHANGE COLUMN `image_id` `image_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `image_product` `image_product` INT (10) NULL ; UPDATE `nexus_alternate_contacts` SET `main_id`=0 WHERE `main_id` IS NULL; UPDATE `nexus_alternate_contacts` SET `alt_id`=0 WHERE `alt_id` IS NULL; ALTER TABLE `nexus_alternate_contacts` CHANGE COLUMN `main_id` `main_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `alt_id` `alt_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `nexus_coupons` SET `c_id`='' WHERE `c_id` IS NULL; UPDATE `nexus_coupons` SET `c_uses`=0 WHERE `c_uses` IS NULL; UPDATE `nexus_coupons` SET `c_member_uses`=0 WHERE `c_member_uses` IS NULL; UPDATE `nexus_coupons` SET `c_start`=0 WHERE `c_start` IS NULL; UPDATE `nexus_coupons` SET `c_end`=0 WHERE `c_end` IS NULL; ALTER TABLE `nexus_coupons` CHANGE COLUMN `c_id` `c_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `c_uses` `c_uses` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `c_member_uses` `c_member_uses` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `c_start` `c_start` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `c_end` `c_end` INT (10) NOT NULL DEFAULT 0 ; UPDATE `nexus_customer_fields` SET `f_id`='' WHERE `f_id` IS NULL; UPDATE `nexus_customer_fields` SET `f_allow_attachments`=1 WHERE `f_allow_attachments` IS NULL; ALTER TABLE `nexus_customer_fields` CHANGE COLUMN `f_id` `f_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `f_position` `f_position` INT (10) NULL , CHANGE COLUMN `f_allow_attachments` `f_allow_attachments` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 ; UPDATE `nexus_donate_goals` SET `d_id`='' WHERE `d_id` IS NULL; UPDATE `nexus_donate_goals` SET `d_position`=0 WHERE `d_position` IS NULL; ALTER TABLE `nexus_donate_goals` CHANGE COLUMN `d_id` `d_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `d_position` `d_position` INT (10) NOT NULL DEFAULT 0 ; UPDATE `nexus_donate_logs` SET `dl_id`='' WHERE `dl_id` IS NULL; ALTER TABLE `nexus_donate_logs` CHANGE COLUMN `dl_id` `dl_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `dl_goal` `dl_goal` INT (10) NULL , CHANGE COLUMN `dl_member` `dl_member` BIGINT (20) UNSIGNED NULL , CHANGE COLUMN `dl_invoice` `dl_invoice` INT (10) NULL , CHANGE COLUMN `dl_date` `dl_date` INT (10) NULL ; UPDATE `nexus_hosting_accounts` SET `ps_id`=0 WHERE `ps_id` IS NULL; ALTER TABLE `nexus_hosting_accounts` CHANGE COLUMN `ps_id` `ps_id` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `account_server` `account_server` INT (10) NULL ; UPDATE `nexus_hosting_errors` SET `e_id`='' WHERE `e_id` IS NULL; ALTER TABLE `nexus_hosting_errors` CHANGE COLUMN `e_id` `e_id` INT (11) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `e_time` `e_time` INT (10) NULL , CHANGE COLUMN `e_server` `e_server` INT (10) NULL ; UPDATE `nexus_hosting_queues` SET `queue_id`='' WHERE `queue_id` IS NULL; ALTER TABLE `nexus_hosting_queues` CHANGE COLUMN `queue_id` `queue_id` INT (11) NOT NULL AUTO_INCREMENT ; UPDATE `nexus_hosting_servers` SET `server_id`='' WHERE `server_id` IS NULL; UPDATE `nexus_hosting_servers` SET `server_dedicated`=0 WHERE `server_dedicated` IS NULL; ALTER TABLE `nexus_hosting_servers` CHANGE COLUMN `server_id` `server_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `server_max_accounts` `server_max_accounts` INT (5) NULL , CHANGE COLUMN `server_monitor_fails` `server_monitor_fails` INT (2) NULL , CHANGE COLUMN `server_monitor_last_sucess` `server_monitor_last_sucess` INT (10) NULL , CHANGE COLUMN `server_monitor_version` `server_monitor_version` INT (5) NULL , CHANGE COLUMN `server_dedicated` `server_dedicated` INT (10) NOT NULL DEFAULT 0 ; UPDATE `nexus_packages_hosting` SET `p_id`=0 WHERE `p_id` IS NULL; ALTER TABLE `nexus_packages_hosting` CHANGE COLUMN `p_id` `p_id` INT (8) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_queue` `p_queue` INT (10) NULL , CHANGE COLUMN `p_quota` `p_quota` INT (6) NULL , CHANGE COLUMN `p_maxftp` `p_maxftp` INT (6) NULL , CHANGE COLUMN `p_maxsql` `p_maxsql` INT (6) NULL , CHANGE COLUMN `p_maxpop` `p_maxpop` INT (6) NULL , CHANGE COLUMN `p_maxlst` `p_maxlst` INT (6) NULL , CHANGE COLUMN `p_maxsub` `p_maxsub` INT (6) NULL , CHANGE COLUMN `p_maxpark` `p_maxpark` INT (6) NULL , CHANGE COLUMN `p_maxaddon` `p_maxaddon` INT (6) NULL , CHANGE COLUMN `p_bwlimit` `p_bwlimit` INT (6) NULL ; UPDATE `nexus_packages_ads` SET `p_id`=0 WHERE `p_id` IS NULL; ALTER TABLE `nexus_packages_ads` CHANGE COLUMN `p_id` `p_id` INT (8) NOT NULL DEFAULT 0 , CHANGE COLUMN `p_expire` `p_expire` INT (10) NULL , CHANGE COLUMN `p_max_height` `p_max_height` INT (3) NULL , CHANGE COLUMN `p_max_width` `p_max_width` INT (3) NULL ; UPDATE `nexus_referral_banners` SET `rb_id`='' WHERE `rb_id` IS NULL; UPDATE `nexus_referral_banners` SET `rb_order`=0 WHERE `rb_order` IS NULL; ALTER TABLE `nexus_referral_banners` CHANGE COLUMN `rb_id` `rb_id` INT (5) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `rb_order` `rb_order` INT (5) NOT NULL DEFAULT 0 ; UPDATE `nexus_referral_rules` SET `rrule_id`='' WHERE `rrule_id` IS NULL; ALTER TABLE `nexus_referral_rules` CHANGE COLUMN `rrule_id` `rrule_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT , CHANGE COLUMN `rrule_commission` `rrule_commission` INT (3) NULL ; UPDATE `nexus_referrals` SET `member_id`=0 WHERE `member_id` IS NULL; UPDATE `nexus_referrals` SET `referred_by`=0 WHERE `referred_by` IS NULL; ALTER TABLE `nexus_referrals` CHANGE COLUMN `member_id` `member_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `referred_by` `referred_by` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `nexus_eom` SET `eom_id`='' WHERE `eom_id` IS NULL; ALTER TABLE `nexus_eom` CHANGE COLUMN `eom_id` `eom_id` INT (10) UNSIGNED NOT NULL AUTO_INCREMENT ; UPDATE `nexus_notes` SET `note_id`='' WHERE `note_id` IS NULL; UPDATE `nexus_notes` SET `note_member`=0 WHERE `note_member` IS NULL; UPDATE `nexus_notes` SET `note_author`=0 WHERE `note_author` IS NULL; UPDATE `nexus_notes` SET `note_date`=0 WHERE `note_date` IS NULL; ALTER TABLE `nexus_notes` CHANGE COLUMN `note_id` `note_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `note_member` `note_member` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `note_author` `note_author` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `note_date` `note_date` INT (10) NOT NULL DEFAULT 0 ; UPDATE `nexus_package_base_prices` SET `id`='' WHERE `id` IS NULL; ALTER TABLE `nexus_package_base_prices` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '7000ecf615d786cfb5f17c6febb9d858'; UPDATE `nexus_support_request_log` SET `rlog_id`='' WHERE `rlog_id` IS NULL; UPDATE `nexus_support_request_log` SET `rlog_request`='' WHERE `rlog_request` IS NULL; UPDATE `nexus_support_request_log` SET `rlog_member`='' WHERE `rlog_member` IS NULL; UPDATE `nexus_support_request_log` SET `rlog_date`='' WHERE `rlog_date` IS NULL; ALTER TABLE `nexus_support_request_log` CHANGE COLUMN `rlog_id` `rlog_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `rlog_request` `rlog_request` INT (10) UNSIGNED NOT NULL COMMENT 'The support request ID number', CHANGE COLUMN `rlog_member` `rlog_member` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The member ID of the staff performing the action', CHANGE COLUMN `rlog_old` `rlog_old` INT (10) NULL COMMENT 'The old value', CHANGE COLUMN `rlog_new` `rlog_new` INT (10) NULL COMMENT 'The new value', CHANGE COLUMN `rlog_date` `rlog_date` INT (10) NOT NULL COMMENT 'Unix timestamp of when change was made'; UPDATE `nexus_billing_agreements` SET `ba_id`='' WHERE `ba_id` IS NULL; UPDATE `nexus_billing_agreements` SET `ba_method`='' WHERE `ba_method` IS NULL; UPDATE `nexus_billing_agreements` SET `ba_started`='' WHERE `ba_started` IS NULL; UPDATE `nexus_billing_agreements` SET `ba_canceled`=0 WHERE `ba_canceled` IS NULL; ALTER TABLE `nexus_billing_agreements` CHANGE COLUMN `ba_id` `ba_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `ba_method` `ba_method` INT (5) UNSIGNED NOT NULL COMMENT 'Payment method ID', CHANGE COLUMN `ba_member` `ba_member` BIGINT (20) UNSIGNED NULL COMMENT 'Customer ID', CHANGE COLUMN `ba_started` `ba_started` INT (10) NOT NULL COMMENT 'Unix timestamp of when billing agreement was created', CHANGE COLUMN `ba_next_cycle` `ba_next_cycle` INT (10) NULL COMMENT 'Timestamp of when the next payment will be made or NULL if there was an error last time', CHANGE COLUMN `ba_canceled` `ba_canceled` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'If the agreement has been canceled'; UPDATE `nexus_cart_uploads` SET `id`='' WHERE `id` IS NULL; ALTER TABLE `nexus_cart_uploads` CHANGE COLUMN `id` `id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `time` `time` INT (10) NULL COMMENT 'Unix timestamp of when the file was uploaded', CHANGE COLUMN `item_id` `item_id` INT (10) UNSIGNED NULL COMMENT 'The ID number of the item in the cart'; UPDATE `nexus_support_streams` SET `stream_id`='' WHERE `stream_id` IS NULL; UPDATE `nexus_support_streams` SET `stream_tracked`=0 WHERE `stream_tracked` IS NULL; UPDATE `nexus_support_streams` SET `stream_temporary`=1 WHERE `stream_temporary` IS NULL; ALTER TABLE `nexus_support_streams` CHANGE COLUMN `stream_id` `stream_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `stream_owner` `stream_owner` BIGINT (20) UNSIGNED NULL DEFAULT 0 COMMENT 'The ID number of the staff member who owns the stream', CHANGE COLUMN `stream_position` `stream_position` INT (10) NULL DEFAULT 0 COMMENT 'Order in staff members streams', CHANGE COLUMN `stream_tracked` `stream_tracked` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Boolean value indicating if only tracked requests should be included', CHANGE COLUMN `stream_temporary` `stream_temporary` TINYINT (1) UNSIGNED NOT NULL DEFAULT 1 COMMENT 'If this has not yet been saved by its owner'; UPDATE `nexus_support_staff_preferences` SET `staff_id`='' WHERE `staff_id` IS NULL; ALTER TABLE `nexus_support_staff_preferences` CHANGE COLUMN `staff_id` `staff_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number of staff member'; UPDATE `nexus_support_staff_dpt_order` SET `department_id`='' WHERE `department_id` IS NULL; ALTER TABLE `nexus_support_staff_dpt_order` CHANGE COLUMN `staff_id` `staff_id` BIGINT (20) UNSIGNED NULL DEFAULT 0 COMMENT 'The staff\'s member ID', CHANGE COLUMN `department_id` `department_id` INT (10) UNSIGNED NOT NULL COMMENT 'The department ID', CHANGE COLUMN `dpt_position` `dpt_position` INT (10) UNSIGNED NULL COMMENT 'The department position'; UPDATE `nexus_member_subscription_packages` SET `sp_id`='' WHERE `sp_id` IS NULL; UPDATE `nexus_member_subscription_packages` SET `sp_tax`=0 WHERE `sp_tax` IS NULL; UPDATE `nexus_member_subscription_packages` SET `sp_primary_group`=0 WHERE `sp_primary_group` IS NULL; UPDATE `nexus_member_subscription_packages` SET `sp_position`=0 WHERE `sp_position` IS NULL; UPDATE `nexus_member_subscription_packages` SET `sp_count_active`=0 WHERE `sp_count_active` IS NULL; UPDATE `nexus_member_subscription_packages` SET `sp_count_inactive`=0 WHERE `sp_count_inactive` IS NULL; UPDATE `nexus_member_subscription_packages` SET `sp_return_primary`=0 WHERE `sp_return_primary` IS NULL; UPDATE `nexus_member_subscription_packages` SET `sp_renew_upgrade`=0 WHERE `sp_renew_upgrade` IS NULL; ALTER TABLE `nexus_member_subscription_packages` CHANGE COLUMN `sp_id` `sp_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `sp_tax` `sp_tax` INT (5) NOT NULL DEFAULT 0 , CHANGE COLUMN `sp_primary_group` `sp_primary_group` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `sp_position` `sp_position` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `sp_reg_show` `sp_reg_show` INT (1) NULL DEFAULT 0 , CHANGE COLUMN `sp_featured` `sp_featured` INT (1) NULL DEFAULT 0 , CHANGE COLUMN `sp_count_active` `sp_count_active` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `sp_count_inactive` `sp_count_inactive` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `sp_return_primary` `sp_return_primary` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `sp_renew_upgrade` `sp_renew_upgrade` TINYINT (2) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Upgrade options for non-renewable subscriptions'; UPDATE `nexus_member_subscriptions` SET `sub_id`='' WHERE `sub_id` IS NULL; UPDATE `nexus_member_subscriptions` SET `sub_member_id`=0 WHERE `sub_member_id` IS NULL; UPDATE `nexus_member_subscriptions` SET `sub_start`=0 WHERE `sub_start` IS NULL; UPDATE `nexus_member_subscriptions` SET `sub_expire`=0 WHERE `sub_expire` IS NULL; UPDATE `nexus_member_subscriptions` SET `sub_package_id`=0 WHERE `sub_package_id` IS NULL; UPDATE `nexus_member_subscriptions` SET `sub_previous_group`=0 WHERE `sub_previous_group` IS NULL; UPDATE `nexus_member_subscriptions` SET `sub_renews`=0 WHERE `sub_renews` IS NULL; UPDATE `nexus_member_subscriptions` SET `sub_purchase_id`=0 WHERE `sub_purchase_id` IS NULL; UPDATE `nexus_member_subscriptions` SET `sub_invoice_id`=0 WHERE `sub_invoice_id` IS NULL; UPDATE `nexus_member_subscriptions` SET `sub_added_manually`=0 WHERE `sub_added_manually` IS NULL; ALTER TABLE `nexus_member_subscriptions` CHANGE COLUMN `sub_id` `sub_id` INT (10) NOT NULL AUTO_INCREMENT , CHANGE COLUMN `sub_member_id` `sub_member_id` BIGINT (20) NOT NULL DEFAULT 0 , CHANGE COLUMN `sub_start` `sub_start` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `sub_expire` `sub_expire` INT (10) NOT NULL DEFAULT 0 , CHANGE COLUMN `sub_package_id` `sub_package_id` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `sub_previous_group` `sub_previous_group` INT (10) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `sub_renews` `sub_renews` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `sub_purchase_id` `sub_purchase_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `sub_invoice_id` `sub_invoice_id` BIGINT (20) UNSIGNED NOT NULL DEFAULT 0 , CHANGE COLUMN `sub_added_manually` `sub_added_manually` TINYINT (1) UNSIGNED NOT NULL DEFAULT 0 ; UPDATE `nexus_customer_spend` SET `spend_member_id`='' WHERE `spend_member_id` IS NULL; ALTER TABLE `nexus_customer_spend` CHANGE COLUMN `spend_member_id` `spend_member_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Member ID Number'; UPDATE `nexus_package_filters` SET `pfilter_id`='' WHERE `pfilter_id` IS NULL; UPDATE `nexus_package_filters` SET `pfilter_order`='' WHERE `pfilter_order` IS NULL; ALTER TABLE `nexus_package_filters` CHANGE COLUMN `pfilter_id` `pfilter_id` BIGINT (20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'ID Number', CHANGE COLUMN `pfilter_order` `pfilter_order` INT (10) UNSIGNED NOT NULL COMMENT 'The position in the list of filters'; UPDATE `nexus_package_filters_values` SET `pfv_filter`='' WHERE `pfv_filter` IS NULL; UPDATE `nexus_package_filters_values` SET `pfv_value`='' WHERE `pfv_value` IS NULL; UPDATE `nexus_package_filters_values` SET `pfv_lang`='' WHERE `pfv_lang` IS NULL; UPDATE `nexus_package_filters_values` SET `pfv_order`='' WHERE `pfv_order` IS NULL; ALTER TABLE `nexus_package_filters_values` CHANGE COLUMN `pfv_filter` `pfv_filter` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The ID number of the filter', CHANGE COLUMN `pfv_value` `pfv_value` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The ID number of this value', CHANGE COLUMN `pfv_lang` `pfv_lang` BIGINT (20) UNSIGNED NOT NULL COMMENT 'The ID number of the language for this value', CHANGE COLUMN `pfv_order` `pfv_order` INT (10) UNSIGNED NOT NULL COMMENT 'The position amongst the values for this filter'; ALTER TABLE `nexus_package_filters_map` CHANGE COLUMN `pfm_package` `pfm_package` BIGINT (20) UNSIGNED NULL COMMENT 'The package ID', CHANGE COLUMN `pfm_filter` `pfm_filter` BIGINT (20) UNSIGNED NULL COMMENT 'The filter ID'; ALTER TABLE `core_members` CHANGE COLUMN `cm_return_group` `cm_return_group` SMALLINT (3) NULL DEFAULT 0
4 сентября, 20222 yr comment_185620 Так а в чем проблема выполнить указанные запросы к базе данных вручную? Можно это сделать за один раз, сразу все запросы вставить в поле для запросов и выполнить.
4 сентября, 20222 yr Author comment_185621 2 минуты назад, Zero108 сказал: Так а в чем проблема выполнить указанные запросы к базе данных вручную? Можно это сделать за один раз, сразу все запросы вставить в поле для запросов и выполнить. Я сделал ничего не изменилось
4 сентября, 20222 yr comment_185625 У меня было подобное из-за пары плагинов. Удалил и все вернулось на свое место. Если ЧИТЫЙ форум, то это странно конечно
4 сентября, 20222 yr Author comment_185627 34 минуты назад, aLEX49566 сказал: У меня было подобное из-за пары плагинов. Удалил и все вернулось на свое место. Если ЧИТЫЙ форум, то это странно конечно Может быть что проблема в кодировке? или PHP?
4 сентября, 20222 yr comment_185628 3 минуты назад, Dusty сказал: Может быть что проблема в кодировке? или PHP? Что если к чистой базе подключить? Мне лично никакие запросы не помогали, в самой базе все было именно так, как указано в ошибке, т.е. ошибки не было даже..
5 сентября, 20222 yr Author comment_185647 2 часа назад, Zero108 сказал: Какая версия php? 7.4 IPS 4.4 Это тестовый стоит пока что Edited 5 сентября, 20222 yr by Dusty
5 сентября, 20222 yr comment_185655 3 часа назад, Dusty сказал: IPS 4.4 Всех исправленных багов и не упомнишь. Ставь стабильную проверенную версию 4.6.12.1.
5 сентября, 20222 yr Author comment_185658 16 минут назад, Zero108 сказал: Всех исправленных багов и не упомнишь. Ставь стабильную проверенную версию 4.6.12.1. Да проблема была в кодировке
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.