Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHamidreza Ghavami <hamid.r.gh.1998@gmail.com>2023-05-05 22:52:39 +0300
committerHamidreza Ghavami <hamid.r.gh.1998@gmail.com>2023-05-05 22:52:39 +0300
commit26f160fb89f1356f9ec69e2bdfad32d5b543325a (patch)
tree73389e77f5ca2369e5fff721667d653ba99ec227 /main.go
parent0a5811adf8077aa008d4ff795092d8ca547999e1 (diff)
add MigrateDB func for a single source of truth
Diffstat (limited to 'main.go')
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index 8cb2af22..68f59911 100644
--- a/main.go
+++ b/main.go
@@ -2,7 +2,6 @@ package main
import (
"fmt"
- "github.com/spf13/cobra"
"log"
"os"
"os/signal"
@@ -16,6 +15,8 @@ import (
"x-ui/web/global"
"x-ui/web/service"
+ "github.com/spf13/cobra"
+
"github.com/op/go-logging"
)
@@ -215,8 +216,7 @@ func migrateDb() {
log.Fatal(err)
}
fmt.Println("Start migrating database...")
- inboundService.MigrationRequirements()
- inboundService.RemoveOrphanedTraffics()
+ inboundService.MigrateDB()
fmt.Println("Migration done!")
}