small fixed, device repo and some device api
This commit is contained in:
+7
-1
@@ -4,6 +4,7 @@ import (
|
||||
"git.aiterp.net/lucifer/new-server/app/config"
|
||||
"github.com/pressly/goose"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -19,7 +20,12 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
err = goose.Run("up", db, "./scripts")
|
||||
cmd := os.Getenv("GOOSE_COMMAND")
|
||||
if cmd == "" {
|
||||
cmd = "up"
|
||||
}
|
||||
|
||||
err = goose.Run(cmd, db, "./scripts")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user