I am using knex with postgres in my Node project, I have two different project using same database but different schemas. I can operate with different schemas while writing any query or doing migration using
knex.schema.withSchema , but knex is not creating lock table in those respective schemas. It uses default public schema in database to create lock tables. So first project would migrate fine but when I migrate second project it throws error- Error: The migration directory is corrupt, the following files are missing: 20210430124918_test.ts
which is the file for first project. Since it uses same public schema with same name for creating lock table it thinks file is missing.
I don't want to change the migration-lock file name in knexfile.ts, Is there a way to specify which schema to be used for creating lock tables for different projects.
Thanks in Advance.