The Wire · Showcase
RAILS SHIPS REVERSIBLE FOREIGN KEY MIGRATIONS, PRODUCT REVIEWS TUTORIAL GOES LIVE
By RepoJournal · Filed · About Rails
The framework just made database rollbacks safer while shipping a complete e-commerce guide that teaches real-world patterns.
Rails merged a critical fix for migration reversibility [1] that makes `remove_foreign_key(if_exists: true)` properly invertible. This closes a longstanding gap where developers could drop constraints but couldn't reliably undo it. On the documentation front, the new Product Reviews Tutorial [2] lands in the guides, completing the e-commerce store series with a full-featured implementation: star ratings, image uploads, automatic product rating updates, and admin management tools. The tutorial demonstrates radio buttons for ratings, filtered views by score, and percentage bar graphs. Shopify also shipped a fix for polymorphic belongs_to relationships with sharded primary keys [3], addressing a pain point for teams running distributed databases. The website team updated the main tutorial page [4] to link the new product reviews guide and removed the 'Coming soon' badge.
Action items
- → Review the reversible foreign key fix [ref:1] if you manage complex migrations rails/rails [plan]
- → Bookmark the Product Reviews Tutorial [ref:2] for your next e-commerce project rails/rails [monitor]
- → Check the sharded primary key fix [ref:3] if you're using polymorphic relationships at scale rails/rails [plan]
References
- [1] Merge pull request #57972 from 55728/fix-invert-remove-foreign-key-if-exists rails/rails
- [2] [RF-DOCS][ci-skip] Add Product Reviews Tutorial ↗ rails/rails
- [3] Merge pull request #57959 from Shopify/fix-polymorphic-belongs-to-sharded-primary-key rails/rails
- [4] Update tutorial.html (#686) rails/website
FAQ
- What changed in Rails on July 4, 2026?
- The framework just made database rollbacks safer while shipping a complete e-commerce guide that teaches real-world patterns.
- What should Rails teams do about it?
- Review the reversible foreign key fix [ref:1] if you manage complex migrations • Bookmark the Product Reviews Tutorial [ref:2] for your next e-commerce project • Check the sharded primary key fix [ref:3] if you're using polymorphic relationships at scale
- Which Rails repositories shipped on July 4, 2026?
- rails/rails, rails/website