Skip to content

Commit

Permalink
Add Roll.Schema method
Browse files Browse the repository at this point in the history
Having access to the name of the schema to which a migration is being
applied is useful to hooks.
  • Loading branch information
andrew-farries committed Mar 1, 2024
1 parent 577870c commit 4581169
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/roll/roll.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ func (m *Roll) PgConn() *sql.DB {
return m.pgConn
}

func (m *Roll) Schema() string {

Check failure on line 102 in pkg/roll/roll.go

View workflow job for this annotation

GitHub Actions / dead code check

unreachable func: Roll.Schema

Check failure on line 102 in pkg/roll/roll.go

View workflow job for this annotation

GitHub Actions / dead code check

unreachable func: Roll.Schema
return m.schema
}

func (m *Roll) Status(ctx context.Context, schema string) (*state.Status, error) {
return m.state.Status(ctx, schema)
}
Expand Down

0 comments on commit 4581169

Please sign in to comment.