data-migrate
departure
data-migrate | departure | |
---|---|---|
14 | 1 | |
1,357 | 134 | |
- | 0.0% | |
7.7 | 8.0 | |
7 days ago | 2 months ago | |
Ruby | Ruby | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
data-migrate
-
Undocumented Gem Incompatibilities with Rails 7.1
For example, take the popular data-migrate gem. Its gemspec requires activerecord >= 6.1 with no upper bound. Looking at the changelog, though, you'll see that support for Rails 7.1 wasn't added until version 9.2.0. Older versions will hit this exception when someone tries to run migrations under the latest Rails, even though bundler installs the package with no warning.
-
Data Migration Strategies in Ruby on Rails: The Right Way to Manage Missing Data
The third option is to use the data-migrate gem.
-
Update Millions of Records in Rails
I was thinking of this one, I believe, but it's pretty old:
https://github.com/OffgridElectric/rails-data-migrations
This is maybe a more modern one I found:
https://github.com/ilyakatz/data-migrate
- How does Rails handle out of order migrations (when working on different local branches)
-
Safe data migrations in Rails
https://github.com/ilyakatz/data-migrate exists for exactly this purpose with a similar approach as active record migrations.
- Versionamento de banco de dados no Git
-
Data migrations with Rails
Data migration gem There are a couple of gems that helps organize your data migrations in the same way as schema migrations, one of the most known data-migrate. You can simply generate a new migration:
-
Data Migrations in NestJS
In the past, we've used data-migrate for this, but this comes with pitfalls. What happens if the deploy fails? We can often end up with strange errors and changes in state, so it's nicer to have a bit more control.
-
Squash Migrations in Legacy Apps
I guess you were talking about this: https://github.com/ilyakatz/data-migrate ?
- Migrações de dados em Ruby on Rails
departure
-
Changing Tires at 100mph: A Guide to Zero Downtime Migrations
At least for Rails there are several gems available (ie https://github.com/WeTransfer/ghost_adapter or https://github.com/departurerb/departure) that seamlessly hook into the existing migration system and will run all eligible migrations through gh-ost or pt-osc as needed. You're right that it's not free but it isn't all that far off either.
That said, online schema migrations are a specialized tool designed for very big tables that take hours to run an ALTER TABLE on. If all your tables are small enough that alterations take less than a second or so, don't bother and just block the table for a bit. It's fine.
What are some alternatives?
strong_migrations - Catch unsafe migrations in development
reshape - An easy-to-use, zero-downtime schema migration tool for Postgres
Discourse - A platform for community discussion. Free, open, simple.
pg-osc - Easy CLI tool for making zero downtime schema changes and backfills in PostgreSQL
Ruby on Rails - Ruby on Rails
ghost_adapter - Run ActiveRecord migrations through gh-ost
seed_migration - Seed Migration
janet - A dynamic language and bytecode vm
indifferent_access - [ALPHA] - Elixir Plug/Utility doing questionable things with maps/params
litestream - Streaming replication for SQLite.
bullet - help to kill N+1 queries and unused eager loading
gh-ost - GitHub's Online Schema-migration Tool for MySQL