3 ms·
Looks interesting - GitOps for databases. Can I rollback to a specific version? I think Rails has a combination - migration files + schema file that serves a s
by ishcheklein 6y ago
Looks interesting - GitOps for databases. Can I rollback to a specific version?
I think Rails has a combination - migration files + schema file that serves a source of truth https://edgeguides.rubyonrails.org/active_record_migrations.html#what-are-schema-files-for-questionmark https://edgeguides.rubyonrails.org/active_record_migrations..... It solves a problem of a cold start, but I'm not sure it can generate a migration from the changes to it.
- awinter-py 6y agoin theory rollback works -- the tool will try to generate a migration between any two git refs in practice the rollback use case isn't tested super well and, for data integrity reasons, it doesn't drop tables -- you'll run into trouble if you try to rollback across an added table
- bdcravens 6y agoRails does some basic tracking in the schema_migrations table, which it uses to enable rollbacks via its CLI.