diff --git a/cmd/api/main.go b/cmd/api/main.go index 6ba9e0e..cd08a33 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -27,7 +27,9 @@ func main() { log.Fatal(err) } - db.AutoMigrate(&client{}) + if err := db.AutoMigrate(&client{}); err != nil { + log.Fatal("Failed to migrate database", err) + } log.Println("Connected to database successfully.")