From e4639684af4d5f3a09e746ae465f0fe8be7a5d5d Mon Sep 17 00:00:00 2001 From: engigu Date: Sat, 20 Sep 2025 16:59:53 +0800 Subject: [PATCH] feat: startup mirgate opt --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 64eb3c6..d4daa1f 100644 --- a/main.go +++ b/main.go @@ -3,8 +3,6 @@ package main import ( "embed" "fmt" - "github.com/gin-gonic/gin" - "github.com/sirupsen/logrus" "message-nest/migrate" "message-nest/models" "message-nest/pkg/constant" @@ -15,6 +13,9 @@ import ( "message-nest/service/cron_service" "net/http" "os" + + "github.com/gin-gonic/gin" + "github.com/sirupsen/logrus" ) var ( @@ -29,8 +30,8 @@ func init() { constant.InitReleaseInfo(rf) setting.Setup() logging.Setup() - migrate.Setup() models.Setup() + go migrate.Setup() } func main() {