I have Postgres and 2 users in it (user1 and user2) with all granted rights. I run migrations as user1 and it completed successfully, then I try to run the same migrations from user2, but I get error relation "goose_db_version" already exists, although the real error is that permission to read "goose_db_version" table is denied for user2.
The problem is in the line https://github.com/pressly/goose/blob/master/migrate.go#L216, goose tries to get list of migrations and after getting any error tries to create table "goose_db_version". This is confusing, I think it is necessary to create table "goose_db_version" only if it does not exist and return error in any other case.