Migrating DATA - not just schema, Rails

后端 未结 3 1685
忘掉有多难
忘掉有多难 2020-12-31 07:16

Sometimes, data migrations are required. As time passes, code changes and migrations using your domain model are no longer valid and migrations fail. What a

3条回答
  •  醉梦人生
    2020-12-31 07:48

    Some times 'migrating data' could not be performed as a part of schema migration, like discussed above. Sometimes 'migrating data' means 'fix historical data inconstancies' or 'update your Solr/Elasticsearch' index, so its a complex task. For these kind of tasks, check out this gem https://github.com/OffgridElectric/rails-data-migrations

    This gem was designed to decouple Rails schema migrations from data migrations, so it wont cause downtimes at deploy time and make it easy to manage in overall

提交回复
热议问题