postgres-migrations
postgres-migrations copied to clipboard
schema of migrations table
Is it possible to specify the schema of the migrations table? I'd like to separate tables by schema, and have separate migrations for each schema. That way, I can do drop schema ... cascade
to recreate parts of my database. This would allow me to iterate fast on a schema while preserving any information I might have in other schemas.
Thanks for the issue.
At the moment, no, there isn't a way.
There are a bunch of issues and PRs about similar issues to do with the schema and problems with the search path. Please have a look around.
Until someone solves this whole problem, backwards compatibly (or with an upgrade path if not possible), with appropriate tests and documentation, then I don't think this is going to get fixed soon. I simply don't have the time/energy to focus on this right now.
Ok, no problem. Thanks for the quick reply and for being honest.
@dlidstrom https://github.com/jbelelieu/pg_node_migrations
I solved my migration issue with DbUp and <50 lines of F#.
If #93 is merged I believe it would become possible to set a search_path on a client before running migrations and passing that client to the migration command.