Skip to content

BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr

SMTP relay synchronizes data. Checks in advance if there is a rename table. Data has been synchronized. Skip.

lotkf1e252b09457
diff --git a/core/internal/service/database_initialization/smtp_relay.go b/core/internal/service/database_initialization/smtp_relay.go
index c58bd27d..e8ca4d64 100644
--- a/core/internal/service/database_initialization/smtp_relay.go
+++ b/core/internal/service/database_initialization/smtp_relay.go
@@ -67,6 +67,11 @@ func init() {
return
}
}
+ // There is a rename table that has been synchronized. Skip.
+ existsOld := checkTableExists(ctx, "bm_relay_old")
+ if existsOld {
+ return
+ }
// Migrate the old data to the new structure
if err := migrateRelayData(ctx); err != nil {
@@ -80,7 +85,6 @@ func init() {
return
}
g.Log().Info(ctx, "Relay configuration migration completed successfully.")
- //migrateRelayData()
})
}