Skip to content

Commit

Permalink
Merged in shuhaowu/goose/migration-on-db-obj (pull request pressly#35)
Browse files Browse the repository at this point in the history
Function to migrate specific database.
  • Loading branch information
parkr committed Jan 15, 2015
2 parents 9d1a22d + 1ff4053 commit 8488cc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/goose/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ func RunMigrations(conf *DBConf, migrationsDir string, target int64) (err error)
}
defer db.Close()

return RunMigrationsOnDb(conf, migrationsDir, target, db)
}

// Runs migration on a specific database instance.
func RunMigrationsOnDb(conf *DBConf, migrationsDir string, target int64, db *sql.DB) (err error) {
current, err := EnsureDBVersion(conf, db)
if err != nil {
return err
Expand Down

0 comments on commit 8488cc4

Please sign in to comment.