Replies: 1 comment
|
Thanks for opening this request. I think that's a good idea. Migrations are executed here We would need to change this line to inspect the returned error and see if it contains something like the error message mentioned in the OP. For the second branch we could likely also check if the input contains more than one |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Backend
PostgreSQL
What do you want to add to diesel?
When migrations fail because the operation is not allowed to run inside transactions, the error message just shows:
The error message should be enhanced by linking to e.g. https://docs.diesel.rs/master/diesel_migrations/struct.FileBasedMigrations.html and mentioning that a
metadata.tomlfile can be used to disable transaction usage for the migration.Additionally, if the migration contains multiple commands, Postgres will open an implicit transaction even if
run_in_transaction = falsewas used, resulting in the same error message (see #4552). If we detectrun_in_transaction = falseand the error above, we should instead suggest to split the migration into multiple single-instruction migrations to resolve the problem.All reactions