How we've migrated from globalize to hstore-translate
Description and use
Migrated a Rails app from Globalize to hstore-translate, simplifying the schema and improving performance.
Problem
The Rails application used Globalize for translations but needed a more efficient solution for storing localized data.
Outcome
The migration consolidated translation data into hstore columns, simplifying the schema and improving performance.
Workflow
- 1. Added the hstore-translate gem to the Gemfile.
- 2. Ran migrations to add hstore columns to the relevant tables.
- 3. Updated model definitions to use hstore-translate instead of Globalize.
- 4. Migrated existing data from Globalize tables to the new hstore columns using a custom rake task.
- 5. Removed Globalize gems and tables after verifying data integrity.
- 6. Updated application code to use the new translation syntax.
Evidence
We added the hstore-translate gem to the Gemfile.
We ran migrations to add hstore columns to the relevant tables.
We updated model definitions to use hstore-translate instead of Globalize.
- Record date: 2026-10-17T04:41:12.740Z