rubenv / sql-migrate

SQL schema migration tool for Go.
MIT License
3.24k stars 280 forks source link

Migration failed: pq: relation "gorp_migrations" does not exist #151

Open mdere-unbound opened 5 years ago

mdere-unbound commented 5 years ago

Any reason why this could be happening? I checked my permissions for the user to access the DB and it looks good to me...what else can I be missing? Also it does seem like the sql-migrate up command too is creating the gorp_migrations table too.

artn commented 4 years ago

Same issue. Though sql-migrate creates table for migrations, migration failed with message Migration failed: pq: relation "migrations" does not exist handling 000_db_schema.sql

kkyr commented 4 years ago

I had the same issue and fixed it by providing a schema inside dbconfig.yaml:

development:
  dialect: postgres
  datasource: host=localhost port=5432 dbname=test user=user password=pass sslmode=disable
  dir: migrations
  schema: account
  table: migrations