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

How we've migrated from globalize to hstore-translate

Description and use

Migrating a Rails app from Globalize to hstore-translate simplifies the schema and improves performance while preserving translation functionality.

Problem

The Rails application used Globalize for translations, which required a separate translations table and added complexity to queries and migrations.

Outcome

The migration reduced database joins, simplified schema, and improved migration speed while maintaining translation functionality.

Workflow

  • Identify all models using Globalize
  • Add a new hstore column (e.g., "translations") to each model
  • Write a migration script to copy existing translations into the hstore column
  • Update model code to use hstore-translate instead of Globalize
  • Run tests and verify data integrity
  • Remove Globalize gems and tables
  • Update documentation and deployment scripts

Evidence

We migrated from Globalize to hstore-translate to simplify our schema and improve performance.

  • Record date: 2026-09-09T01:45:33.030Z