MCPcopy Index your code
hub / github.com/rubenv/sql-migrate / ExecVersionContext

Function ExecVersionContext

migrate.go:499–504  ·  view source on GitHub ↗

Execute a set of migrations with an input context. Will apply at the target `version` of migration. Cannot be a negative value. Returns the number of applied migrations.

(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64)

Source from the content-addressed store, hash-verified

497//
498// Returns the number of applied migrations.
499func ExecVersionContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64) (int, error) {
500 if version < 0 {
501 return 0, fmt.Errorf("target version %d should not be negative", version)
502 }
503 return migSet.ExecVersionContext(ctx, db, dialect, m, dir, version)
504}
505
506// Returns the number of applied migrations.
507func (ms MigrationSet) ExecMax(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) {

Callers 1

ExecVersionFunction · 0.85

Calls 1

ExecVersionContextMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…