RepoJournal
Rails

@rails

Ruby on Rails - Shopify, Basecamp, GitHub all run on it

Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: Ruby Full archive →

The Wire · Showcase

RAILS TIGHTENS MIGRATION REVERSIBILITY AND TIMESTAMPS VALIDATION

By RepoJournal · Filed · About Rails

Two critical migration fixes landed overnight that prevent silent failures when rolling back idempotent operations, plus stricter validation for ignored options in change_table blocks.

Rails now raises ArgumentError when remove_timestamps receives if_exists or if_not_exists options it cannot honor, closing the last gap in change_table validation [1]. Previously every other column-altering helper in change_table raised on ignored conditional options, but remove_timestamps quietly dropped them and proceeded anyway, masking developer intent during migrations.

Inversion of add_index and remove_index now correctly translates conditional modifiers so rollbacks stay idempotent [2]. The bug meant inverting add_index with if_not_exists carried the wrong option to the generated remove_index, and rolling back remove_index with if_exists lost its safety modifier entirely. Both scenarios would explode on replay if the index state didn't match the original migration attempt.

On the lighter side, Rails added this_quarter? to Date and Time [4], completing the predicate family alongside this_week?, this_month?, and this_year?. Also landed: documentation fix clarifying that number_to_percentage defaults to 3 decimal places, not 2 [3], bringing docs in line with actual behavior.

One email a day. Unsubscribe in one click.

Action items

References

  1. [1] Raise on ignored if_exists option in change_table remove_timestamps rails/rails
  2. [2] Make add_index/remove_index if_(not_)exists reversible rails/rails
  3. [3] Fix incorrect number_to_percentage default precision in docs [ci skip] rails/rails
  4. [4] Add this_quarter? to Date/Time rails/rails

Quick answers

What shipped in Rails on July 5, 2026?
Two critical migration fixes landed overnight that prevent silent failures when rolling back idempotent operations, plus stricter validation for ignored options in change_table blocks. In total, 22 commits and 13 pull requests landed.
What were the notable Rails updates?
Raise on ignored if_exists option in change_table remove_timestamps, Make add_index/remove_index if_(not_)exists reversible, and Fix incorrect number_to_percentage default precision in docs [ci skip].

More from @rails

Daily updates, in your inbox

Follow Rails

Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?

We use privacy-friendly analytics (Google Analytics, IP-anonymized) to see which pages help readers. No ads, and we never sell your data. See our Privacy Policy.