func Upgrade(c *DatabaseConfig) (err error) { var m *gomigrate.Migrator m, err = getMigrator(c) if err != nil { fmt.Println(err) return } err = m.Migrate() return }
// Migrate migrates database func (a *App) Migrate(migrator gomigrate.Migrator) { if err := migrator.Migrate(); err != nil { log.Fatalln("migrations failed", err.Error()) } }