From dae10156988fb62452a9366847bb3756fd54009e Mon Sep 17 00:00:00 2001 From: Acho Arnold Date: Fri, 8 Dec 2023 17:18:15 +0200 Subject: [PATCH] Disable automigration --- api/pkg/di/container.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/api/pkg/di/container.go b/api/pkg/di/container.go index edbfebbc..e2d63d61 100644 --- a/api/pkg/di/container.go +++ b/api/pkg/di/container.go @@ -231,13 +231,13 @@ func (container *Container) DedicatedDB() (db *gorm.DB) { } container.logger.Debug(fmt.Sprintf("Running migrations for yugabyte [%T]", db)) - if err = db.AutoMigrate(&entities.Heartbeat{}); err != nil { - container.logger.Fatal(stacktrace.Propagate(err, fmt.Sprintf("cannot migrate %T", &entities.Heartbeat{}))) - } - - if err = db.AutoMigrate(&entities.HeartbeatMonitor{}); err != nil { - container.logger.Fatal(stacktrace.Propagate(err, fmt.Sprintf("cannot migrate %T", &entities.HeartbeatMonitor{}))) - } + //if err = db.AutoMigrate(&entities.Heartbeat{}); err != nil { + // container.logger.Fatal(stacktrace.Propagate(err, fmt.Sprintf("cannot migrate %T", &entities.Heartbeat{}))) + //} + // + //if err = db.AutoMigrate(&entities.HeartbeatMonitor{}); err != nil { + // container.logger.Fatal(stacktrace.Propagate(err, fmt.Sprintf("cannot migrate %T", &entities.HeartbeatMonitor{}))) + //} container.dedicatedDB = db return container.dedicatedDB