diff --git a/pandora_console/extras/mr/69.sql b/pandora_console/extras/mr/69.sql index 1516d15d5d..7d83d8a467 100644 --- a/pandora_console/extras/mr/69.sql +++ b/pandora_console/extras/mr/69.sql @@ -23,6 +23,11 @@ UPDATE `tusuario` SET `language` = 'default' WHERE `language` = 'zh_CN'; UPDATE `tconfig` SET `value` = 'en_GB' WHERE `token` = 'language' AND `value` = 'zh_CN'; UPDATE `tconfig` SET `value` = 'Andromeda' WHERE `token` = 'lts_name'; +SET @id_token_last_compact_offset = NULL; +SET @token_name_last_compact_offset = 'last_compact_offset'; +SELECT @id_token_last_compact_offset := `id_config` FROM `tconfig` WHERE `token` = @token_name_last_compact_offset ORDER BY `id_config` DESC LIMIT 1; +DELETE FROM `tconfig` WHERE `token` = @token_name_last_compact_offset AND `id_config` != @id_token_last_compact_offset; + -- START MIGRATION MSSQL -- SET @current_app_type = 12; SET @short_name = 'pandorafms.mssql'; diff --git a/pandora_server/util/pandora_db.pl b/pandora_server/util/pandora_db.pl index b17729e2f2..cba4d7a14a 100755 --- a/pandora_server/util/pandora_db.pl +++ b/pandora_server/util/pandora_db.pl @@ -475,6 +475,7 @@ sub pandora_compactdb { my $last_compact_offset = pandora_get_config_value($dbh, "last_compact_offset"); if ($last_compact_offset eq "") { + db_do ($dbh, "DELETE FROM tconfig WHERE token = 'last_compact_offset'"); db_do($dbh, "INSERT INTO tconfig (token, value) VALUES ('last_compact_offset', '0')"); $last_compact_offset = 0; }