From c8c569a6432f0fec47de88fd7763d07fbbd0d44b Mon Sep 17 00:00:00 2001 From: divyam234 <47589864+divyam234@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:52:44 +0530 Subject: [PATCH] chore: panic error during database migration --- internal/database/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/database/database.go b/internal/database/database.go index f7f1fd6..13a2827 100644 --- a/internal/database/database.go +++ b/internal/database/database.go @@ -60,7 +60,7 @@ func NewDatabase(cfg *config.Config) (*gorm.DB, error) { sqlDb, _ := db.DB() err = migrateDB(sqlDb) if err != nil { - return nil, err + panic(err) } return db, nil