Can anyone point me to any best practices on running database migrations in a kubernetes (or similar) environment with automated deployment?
@Floppy django model: commit migrations as files to the repo, have a database table of migrations which have been applied? Recording in db keeps that state together with the schema. Also means you have history of schema changes.
@h2g2bob yeah we’re using sequelize which has an equivalent. Wondering how to manage those in a blue/green deploy environment, but I think I’m coming up with a plan...
@Floppy More important question: do you *really* want to auto-deploy this? If we're talking SQL, we're talking exclusive lock. Which is super-happy fun times. Waits for anything currently using the table to finish, but while waiting causes all new queries to wait. Those queries may take locks on other tables. Setting statement timeout would deal with some of that, maybe.
A social media community hosted in the UK; part of the Mastodon/ActivityPub federated social network, which allows you to follow users on other communities. It's a bit like Twitter but without a single company in control.
This is a volunteer-run community administered by @floppy, and hosted by Mastohost in the UK. Please support our running costs by joining the Open Collective and becoming a backer. Thanks go to our existing backers - this place exists because of them!