3 ms·
We don't write migrations for our C++, so why the heck are we writing migrations for our DBs The reason is that your database is much more "stateful" than you
by gghh 11y ago
We don't write migrations for our C++, so why the heck are we writing migrations for our DBs
The reason is that your database is much more "stateful" than you binary executables. A db migration (DDL, i.e. when you change the schema of your db) can take days to apply (eg: create an index in a large table), and you don't want to re-do it every time you deploy. That's why database changes are much more "diff oriented" than your code: when you deploy code you just compile the whole thing and replace the old binary with a new one.