update migrations / gitignore

This commit is contained in:
Henry Dollman
2024-08-11 15:14:58 -04:00
parent dd55e74ec9
commit 9d2192f323
5 changed files with 7 additions and 3 deletions

4
.gitignore vendored
View File

@@ -7,4 +7,6 @@ beszel-agent
beszel_data
beszel_data*
dist
*.exe
*.exe
beszel/cmd/hub/hub
beszel/cmd/agent/agent

View File

@@ -4,6 +4,7 @@ import (
"beszel"
"beszel/internal/hub"
"beszel/internal/update"
_ "beszel/migrations"
"github.com/pocketbase/pocketbase"
"github.com/spf13/cobra"

View File

@@ -57,6 +57,7 @@ func (h *Hub) Run() {
migratecmd.MustRegister(h.app, h.app.RootCmd, migratecmd.Config{
// (the isGoRun check is to enable it only during development)
Automigrate: isGoRun,
Dir: "../../migrations",
})
// set auth settings

View File

@@ -1,4 +1,4 @@
package main
package migrations
import (
"encoding/json"

View File

@@ -1,4 +1,4 @@
package main
package migrations
import (
"github.com/pocketbase/dbx"