0

I'm using sequelize to run migrations on my DB, the user has all privileges and migrations work well, however it creates SequelizeMeta table in a public schema. When I set schema in the config with migrationStorageTableSchema migrations fail with:

permission denied for database blabla

double-beep
  • 5,031
  • 17
  • 33
  • 41
  • Do you run **sequelize init** command? – Riajul Islam Mar 27 '19 at 10:32
  • @RiajulIslam The project is relatively old legacy code, just got it to support. Judging to the directory structure it wasn't bootstrapped with init command or was with the older version of it. The migrations run with the following command: sequelize db:migrate --config ./src/database/config/staging.js --migrations-path ./src/database/migrations --seeders-path ./src/database/seeders --models-path ./src/database/models – Dmytro Zharkov Mar 27 '19 at 10:46
  • 1
    The problem was in missing searchPath: solved with ALTER DATABASE blabla SET search_path = schema_name – Dmytro Zharkov Mar 28 '19 at 11:11

0 Answers0