Documentation ¶
Overview ¶
Package migratecmd adds a new "migrate" command support to a PocketBase instance.
It also comes with automigrations support and templates generation (both for JS and GO migration files).
Example usage:
migratecmd.MustRegister(app, app.RootCmd, migratecmd.Config{ TemplateLang: migratecmd.TemplateLangJS, // default to migratecmd.TemplateLangGo Automigrate: true, Dir: "/custom/migrations/dir", // optional template migrations path; default to "pb_migrations" (for JS) and "migrations" (for Go) }) Note: To allow running JS migrations you'll need to enable first [jsvm.MustRegister()].
Index ¶
Constants ¶
View Source
const (
VERSION = "0.1.0"
)
Variables ¶
This section is empty.
Functions ¶
func MustRegister ¶
MustRegister registers the migratecmd plugin to the provided app instance and panic if it fails.
Example usage:
migratecmd.MustRegister(app, app.RootCmd, migratecmd.Config{})
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.