update migrations

This commit is contained in:
Henry Dollman
2024-07-19 23:47:34 -04:00
parent 16619e5c02
commit 1c3bf5bfe1
2 changed files with 50 additions and 11 deletions

View File

@@ -24,6 +24,7 @@ import (
"github.com/pocketbase/pocketbase/apis"
"github.com/pocketbase/pocketbase/core"
"github.com/pocketbase/pocketbase/models"
"github.com/pocketbase/pocketbase/plugins/migratecmd"
"github.com/pocketbase/pocketbase/tools/cron"
"github.com/pocketbase/pocketbase/tools/mailer"
"golang.org/x/crypto/ssh"
@@ -46,10 +47,10 @@ func main() {
isGoRun := strings.HasPrefix(os.Args[0], os.TempDir())
// // enable auto creation of migration files when making collection changes in the Admin UI
// migratecmd.MustRegister(app, app.RootCmd, migratecmd.Config{
// // (the isGoRun check is to enable it only during development)
// Automigrate: isGoRun,
// })
migratecmd.MustRegister(app, app.RootCmd, migratecmd.Config{
// (the isGoRun check is to enable it only during development)
// Automigrate: isGoRun,
})
// set auth settings
app.OnBeforeServe().Add(func(e *core.ServeEvent) error {