4 ms·
Yes. When I'm applying large changes to permissions across many users and many tables/columns, which happens after every migration, then I absolutely need trans
by hellcow 6y ago
Yes. When I'm applying large changes to permissions across many users and many tables/columns, which happens after every migration, then I absolutely need transaction guarantees. I cannot risk having a half-applied change leaving the database and its users in an unknown state.
- ericpauley 6y agoCould you write your permission changes/rollback logic to be idempotent? In this case you could always push the changes to completion, and reason about whether each intermediate state is safe.
- dvasdekis 6y agoI thought Flyway did this? Have you tried it?
- dekhn 6y agoAn alternative to this is to snapshot the database, and test the permissions change on the snapshot. Not as good as a transaction, but often good enough to proceed with the prod operation.