Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How we've migrated from globalize to hstore-translate

Description and use

Migrated a Rails app from Globalize to hstore-translate, consolidating translations into a single hstore column per model and improving performance.

Problem

The Rails application used Globalize for translations, but Globalize was slow and required a separate translations table, causing performance and maintenance issues.

Outcome

The migration reduced database joins, improved read performance, and simplified the schema by consolidating translations into a single hstore column per model.

Workflow

  • 1. Added hstore column to each model that required translations.
  • 2. Migrated existing translation data from Globalize tables into the new hstore column using a rake task.
  • 3. Updated model code to use hstore-translate methods instead of Globalize.
  • 4. Removed Globalize gems and tables from the schema.
  • 5. Tested application to ensure translations displayed correctly and performance improved.

Evidence

We replaced Globalize with hstore-translate and saw a noticeable performance improvement.

  • Record date: 2026-09-18T13:00:21.627Z