MCPcopy
hub / github.com/rubenv/sql-migrate / ExecMax

Function ExecMax

migrate.go:472–474  ·  view source on GitHub ↗

Execute a set of migrations Will apply at most `max` migrations. Pass 0 for no limit (or use Exec). Returns the number of applied migrations.

(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int)

Source from the content-addressed store, hash-verified

470//
471// Returns the number of applied migrations.
472func ExecMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) {
473 return migSet.ExecMax(db, dialect, m, dir, max)
474}
475
476// Execute a set of migrations with an input context.
477//

Callers 2

TestMigrateMaxMethod · 0.85
TestMigrateDownMethod · 0.85

Calls 1

ExecMaxMethod · 0.80

Tested by 2

TestMigrateMaxMethod · 0.68
TestMigrateDownMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…