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

Function Exec

migrate.go:446–448  ·  view source on GitHub ↗

Execute a set of migrations Returns the number of applied migrations.

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

Source from the content-addressed store, hash-verified

444//
445// Returns the number of applied migrations.
446func Exec(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection) (int, error) {
447 return ExecMaxContext(context.Background(), db, dialect, m, dir, 0)
448}
449
450// Returns the number of applied migrations.
451func (ms MigrationSet) Exec(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection) (int, error) {

Callers 15

TestRunMigrationMethod · 0.85
TestMigrateMultipleMethod · 0.85
TestFileMigrateMethod · 0.85
TestAssetMigrateMethod · 0.85
TestMigrateDownMethod · 0.85
TestMigrateDownFullMethod · 0.85
TestPlanMigrationMethod · 0.85
TestSkipMigrationMethod · 0.85

Calls 1

ExecMaxContextFunction · 0.85

Tested by 15

TestRunMigrationMethod · 0.68
TestMigrateMultipleMethod · 0.68
TestFileMigrateMethod · 0.68
TestAssetMigrateMethod · 0.68
TestMigrateDownMethod · 0.68
TestMigrateDownFullMethod · 0.68
TestPlanMigrationMethod · 0.68
TestSkipMigrationMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…