Re:Ask HN: How do you version your data?
by webmaven on Sunday February 19, 2017 @10:58PM
(#13684183)
I am pretty familiar with several, such as Alembic, South, Django Migrations, etc.
I'm not just interested in versioning schema changes, but data changes as well.
There are database migration tools like Liquibase/datical and, I believe, Flyway that let you specify migrations not just of schema changes (DDL) but also data changes (DML).
I have used Liquibase in production for handling data changes for small-scale data (in megabytes) for dev/test/mock data and/or values in preconfigured application-controlling tables, but I wouldn't use it for gigabytes of transactional data.
What I have done in the past is to prefer lazy migrations (migrate once you access an old record), rather than migrating everything in batch.
Also a good idea to archive data that hasn't been used, moving it outside your primary database.