Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
Add Close method to migrations (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
roneli authored Sep 14, 2021
1 parent 08bc262 commit 1030fe3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions provider/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ func NewMigrator(log hclog.Logger, migrationFiles map[string][]byte, dsn string,
}, nil
}

func (m *Migrator) Close() error {
_, dbErr := m.m.Close()
return dbErr
}

func (m *Migrator) UpgradeProvider(version string) error {
if version == "latest" {
return m.m.Up()
Expand Down

0 comments on commit 1030fe3

Please sign in to comment.