Returns the number of applied migrations, but applies with an input context.
(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int)
| 510 | |
| 511 | // Returns the number of applied migrations, but applies with an input context. |
| 512 | func (ms MigrationSet) ExecMaxContext(ctx context.Context, db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, max int) (int, error) { |
| 513 | migrations, dbMap, err := ms.PlanMigration(db, dialect, m, dir, max) |
| 514 | if err != nil { |
| 515 | return 0, err |
| 516 | } |
| 517 | return ms.applyMigrations(ctx, dir, migrations, dbMap) |
| 518 | } |
| 519 | |
| 520 | // Returns the number of applied migrations. |
| 521 | func (ms MigrationSet) ExecVersion(db *sql.DB, dialect string, m MigrationSource, dir MigrationDirection, version int64) (int, error) { |
no test coverage detected