I\'m building a spring boot application. Flyway database migrations are executed at the application startup.
I decided to use two different roles: role__app
You should write
ALTER DEFAULT PRIVILEGES FOR USER role__migration ...
If you omit the FOR USER
clause, the privileges are only granted on objects created by the user who ran ALTER DEFAULT PRIVILEGES
.
With the above statement, the privileges are granted when role__migration
creates an object. That does not extend to members of the role role__migration
.