3 ms·
We had something similar at Google, where you change some CREATE TABLE statements in an SQL file, then run a migration based on that changed SQL file. It was in
by billllll 4y ago
We had something similar at Google, where you change some CREATE TABLE statements in an SQL file, then run a migration based on that changed SQL file. It was insanely nice. I think this tool can be super useful, especially with a lot more people using something like Litestream.
I'm personally (and maybe naively) of the opinion that DB migrations should be as painless/automated and without ceremony as possible. I wish there were more tools like this out in the wild.
- simonw 4y agoI believe database migrations should be boring and common. At many places I've worked they've been exciting and rare - which massively hurts engineering velocity, to the point that sometimes teams will build things in a really convoluted way rather than go through the bureaucracy of having a schema change accepted!
- azeirah 4y agoAt my work right now (where we're using Laravel, which has migrations as a cultural standard) we have many migrations. But 95% if not more of them are adding stuff, very few are removing or refactoring stuff. The database evolved under harsh deadlines and growth so there's a lot of technical debt in there. It's definitely not terrible, but just wished to see people talking about using migrations to refactor databases a bit more.