Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultMigrationsFs embed.FS
Functions ¶
Types ¶
type MigrationRunner ¶
type MigrationRunner struct {
// contains filtered or unexported fields
}
func NewMigrationRunner ¶
func (*MigrationRunner) RunSafe ¶
func (runner *MigrationRunner) RunSafe() error
RunSafe runs migrations if necessary: new migrations are available and the database is not dirty. It returns the current version of the database or an error. If an error occurs, the database is restored to its previous state.
Click to show internal directories.
Click to hide internal directories.