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

Method ExecVersionContext

migrate.go:525–531  ·  view source on GitHub ↗
(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64)

Source from the content-addressed store, hash-verified

523}
524
525func (ms MigrationSet) ExecVersionContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64) (int, error) {
526 migrations, dbMap, err := ms.PlanMigrationToVersion(db, dialect, m, dir, version)
527 if err != nil {
528 return 0, err
529 }
530 return ms.applyMigrations(ctx, dir, migrations, dbMap)
531}
532
533// Applies the planned migrations and returns the number of applied migrations.
534func (MigrationSet) applyMigrations(ctx context.Context, dir MigrationDirection, migrations []*PlannedMigration, dbMap *gorp.DbMap) (int, error) {

Callers 2

ExecVersionMethod · 0.95
ExecVersionContextFunction · 0.80

Calls 2

applyMigrationsMethod · 0.95

Tested by

no test coverage detected