fix(schema): Database connection not cleanly closed
This commit introduces closing the Schema Manager's underlying driver connection. We were only releasing the shared lock but not actually cleaning up the db connection and relied on the fact that the process would exit to do that for us.
This commit is contained in:
1 parent
8e969787f9
commit
621f8a9ff2
3 files changed
+33
-17
No files matched your search
@@ -251,6 +251,11 @@ func (p *Postgres) Run(ctx context.Context, migration io.Reader, version int, ed
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close closes the underlying Postgres database connection.
|
||||
func (p *Postgres) Close() error {
|
||||
return p.conn.Close()
|
||||
}
|
||||
|
||||
var errOldMigrationTable = stderrors.New("old schema migration table")
|
||||
|
||||
func (p *Postgres) schemaInitialized(ctx context.Context) (bool, error) {
|
||||
|
||||
Reference in new issue
Block a user