mirror of
https://github.com/xataio/pgroll.git
synced 2024-09-17 16:57:30 +03:00
Add a sentinel error `ErrNoActiveMigration` for the case where there is no active migration. This improves the error strings presented to users by not mentioning SQL errors. **`pg-roll start` when there is a migration in progess:** ``` Error: a migration for schema "public" is already in progress ``` **`pg-roll rollback` when there is no migration in progress:** ``` Error: unable to get active migration: no active migration ``` **`pg-complete` when there is no active migration:** ``` Error: unable to get active migration: no active migration ```
6 lines
93 B
Go
6 lines
93 B
Go
package state
|
|
|
|
import "errors"
|
|
|
|
var ErrNoActiveMigration = errors.New("no active migration")
|