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

How we've migrated from globalize to hstore-translate

Описание и применение

Перенос переводов из Globalize в hstore-translate в Rails 3.2 улучшил производительность и упрощает код.

Задача

The Rails application used Globalize for translations but needed a more efficient, database‑native solution.

Результат

The migration reduced database complexity, improved query speed, and simplified the codebase by consolidating translations into a single hstore column.

Рабочий процесс

  • Identify models using Globalize
  • Add an hstore column to each model
  • Create a migration to copy existing translations into the hstore column
  • Remove Globalize configuration and translation tables
  • Update model code to use hstore-translate methods
  • Run tests and verify data integrity

Доказательства

We migrated from Globalize to hstore-translate

Globalize stores translations in separate tables

  • Дата записи: 2026-11-02T10:43:47.536Z