small fixed, device repo and some device api

This commit is contained in:
2021-09-18 16:08:57 +02:00
parent 4e734c86a5
commit 26fcc1f314
19 changed files with 708 additions and 50 deletions
+7 -1
View File
@@ -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)
}