]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/modules/upgrade/serv_upgrade.c
Remediated an unrecoverable problem in CDB_USETABLE.
[citadel.git] / citadel / server / modules / upgrade / serv_upgrade.c
index 6db89583375cfbc3f2b8def5685a7673674c4630..2652cefcc34fa5bda91788a3402c34ecd4206f03 100644 (file)
@@ -3,7 +3,7 @@
 // guesses about what kind of data format changes need to be applied, and
 // we apply them transparently.
 //
-// Copyright (c) 1987-2022 by the citadel.org team
+// Copyright (c) 1987-2023 by the citadel.org team
 //
 // This program is open source software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License version 3.
@@ -478,10 +478,15 @@ void pre_startup_upgrades(void) {
                        CtdlPutRoom(&QRoom);
                }
        }
-
        if ((oldver > 000) && (oldver < 902)) {
                ingest_old_roominfo_and_roompic_files();
        }
+       if ((oldver > 000) && (oldver < 973)) {                         // This was the old extauth table.
+               cdb_trunc(CDB_UNUSED1);                                 // We will do this better someday.
+       }
+       if ((oldver > 000) && (oldver < 975)) {                         // An unrepairable defect was found in this table.
+               cdb_trunc(CDB_USETABLE);                                // We have to discard it and start over.
+       }
 
        CtdlSetConfigInt("MM_hosted_upgrade_level", REV_LEVEL);