Follow

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.

Sign in to participate in the conversation
Open social media for the UK

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.

If you use this server, you are required to abide by our Code of Conduct. If you don't like it, there are plenty of other communities you can use.

If you're coming here from Twitter, there are some very useful services to help you find friends and automatically crosspost toots that you might like to set up once you're signed in.

Backers

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!

Service status is available from our status page and the @status account.