-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support x-migrations-table-schema for postgresql #95
Comments
We are facing similar problem now, we have multiple apps with independent migration histories, and we have all persistence for all apps in a single Postgres with separate schema per app. Right now we have to have all
Describe the solution you'd like
Describe alternatives you've considered
|
Feel free to open a PR w/ the new feature. I'm not sure if it makes sense to use separate schemas for the migrations table and where the migrations are run. e.g. I can't think of a valid usecase for that |
So what you mean is instead of using separate |
Yes, we should only use |
No, I think they should always be together, I don't see why we would want them in separate schemas. |
I just stumbled into a related problem that led me here. In case it helps others... I migrated a db from one pg db instance to another run by a different team. In the first the search_path was It turned out that in the new db the search_path is The immediate problem was fixed with a |
…g-migrate#95) Add x-migrations-table-has-schema to enable schema name support in x-migrations-table value.
…g-migrate#95) Add x-migrations-table-has-schema to enable schema name support in x-migrations-table value.
…g-migrate#95) Add x-migrations-table-has-schema to enable schema name support in x-migrations-table value.
…g-migrate#95) Add x-migrations-table-has-schema to enable schema name support in x-migrations-table value.
…g-migrate#95) Add x-migrations-table-has-schema to enable schema name support in x-migrations-table value.
…g-migrate#95) Add x-migrations-table-has-schema to enable schema name support in x-migrations-table value.
…rate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…rate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…rate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…rate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…rate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…postgres and pgx drivers (golang-migrate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…postgres and pgx drivers (golang-migrate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…postgres and pgx drivers (golang-migrate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…postgres and pgx drivers (golang-migrate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…postgres and pgx drivers (golang-migrate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
…postgres and pgx drivers (golang-migrate#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"`
* Postgres and pgx - Add x-migrations-table-quoted url query option to postgres and pgx drivers (#95) By default, gomigrate quote migrations table name, if `x-migrations-table-quoted` is enabled, then you must to quote migrations table name manually, for instance `"gomigrate"."schema_migrations"` * Work In Progress
@dhui Considering this commit is merged, what do you think to close this issue #95 ? |
Yep, this is fixed in the master branch. I'd prefer to keep this issue open until it's fixed in the latest release. |
@dhui As release |
yep, this can be closed now |
Is your feature request related to a problem? Please describe.
When I was working on multiple schema on postgres, schema_migrations tables are created in multiple schema depending on search_path. This could re-run migration accidentally like the following.
Describe the solution you'd like
I would like to specify schema explicitly to avoid the issue.
Supporting the following parameter on postgres should work:
Describe alternatives you've considered
search_path can work as workaround but I prefer to be specific.
Additional context
N/A
The text was updated successfully, but these errors were encountered: