3 ms·
CF does have a lot of quirks (especially stacks locking up for various reasons, or rollbacks taking hours). I find it easiest to run migrations when an applica
by zapt02 5y ago
CF does have a lot of quirks (especially stacks locking up for various reasons, or rollbacks taking hours).
I find it easiest to run migrations when an application is first starting up (with an appropriate transaction lock so other instances won't cause the migration to run more than once), this way you don't have to do a lot of devops magic for it to work.
- orf 5y agoThat’s not a fantastic model, especially for short lived lambdas. In some small environments just running a migration check on boot is passable, especially if you don’t have better tooling to handle this, but I don’t want to double my execution time working out if I need to run a migration or not in a lambda. I guess I could do the migration check in the lambda startup rather than in the request path, but it’s still not ideal especially when handling rollbacks.