// the find
jesseduffield/lazy_migrate
A little terminal UI for managing schema migrations in rails
A terminal UI gem from the lazygit author that wraps Rails' migration commands so you don't have to remember db:migrate:status output or hand-edit timestamp prefixes. It's for Rails teams who hit migration timestamp collisions often enough to want a dedicated tool instead of just running rails commands directly.
The 'bring to top' feature is the actual reason to install this: re-timestamping a migration after someone else merged ahead of you is normally a four-step manual dance (down, grab new timestamp, rename file, up), and this collapses it to one keypress. It's tested against three separate Rails versions (5.1.5, 5.2.4.3, 6.0.3.4) via Appraisal rather than just whatever version the author happens to run locally. It's Sorbet-typed throughout, which is more rigor than most single-purpose CLI gems bother with.
Last pushed June 2024 with a test matrix that stops at Rails 6.0.3.4 - there's no signal it's been verified against Rails 7 or 8, which is a real risk if you're on a current app. It only handles schema migrations; the README itself flags data_migrate gem support as a 'if anybody wants this, let me know' item that nobody apparently followed up on. Outside of the timestamp-collision feature, most of what it does is a thin wrapper over commands you'd type anyway, so the value proposition is narrow and depends entirely on how often your team actually hits merge races on migrations.