updated changelog

This commit is contained in:
Gani Georgiev
2026-05-15 06:32:58 +03:00
parent 8d7e3abbd6
commit 9c8557a124
2 changed files with 8 additions and 2 deletions
+6 -1
View File
@@ -58,7 +58,7 @@ func init() {
cParsed := dbutils.ParseIndex(raw)
// index already exists (if needed it will be normalized on resave)
if strings.EqualFold(cParsed.IndexName, mParsed.IndexName) {
if cParsed.IndexName != "" && strings.EqualFold(cParsed.IndexName, mParsed.IndexName) {
continue masterLoop
}
}
@@ -70,6 +70,11 @@ func init() {
for _, missing := range missingParsedIndexes {
missingSQL := missing.Build()
// it shouldn't be possible but for just in case if there is an edge case the regex doesn't cover
if missingSQL == "" {
return fmt.Errorf("failed to build sqlite_master index: %v", missingSQL)
}
// drop the missing index to recreate later
_, err := txApp.DB().DropIndex(missing.TableName, missing.IndexName).Execute()
if err != nil {