Closed icco closed 7 years ago
mig, err := migrate.New("file://./db/migrations", dbUrl) if err != nil { return err } err = mig.Up() if err != nil { return err }
This code returns Error migrating database: no change when there are no migrations to run. That's fine tho, I just always want the database to be up to date when this function runs. How do I return healthy, should I just inspect the error?
Error migrating database: no change
yes, check against database.ErrNoChange (https://godoc.org/github.com/mattes/migrate#pkg-variables)
This code returns
Error migrating database: no change
when there are no migrations to run. That's fine tho, I just always want the database to be up to date when this function runs. How do I return healthy, should I just inspect the error?