Rails Apps that need to present different versions of model schemas

I’m writing a Rails3 app that collects data as defined by an external
source. At periodic intervals, the external source will update their
definitions and require a different schema to be presented to the

My end users will be at different versions of the external data schema
have legacy data that needs to remain available when they upgrade to the

The external schema changes are thoughtful and can be layered into the
database (ie, they are not repurposing a field, but a field might be
abandoned in place and future data moved to a new field).

I don’t think this the problem addressed by model versioning like

My thoughts on this process is to use a flag to indicate which version
user wants to see and then check the flag when creating views to show or
hide user elements that are required for the version of the schema that
required. Wondering if someone has a more elegant solution or experience
with a similar situation and wants to share.

You might also consider a schemaless database, like MongoDB as the
storage. Then you can make arbitrary changes without changing a
schema at all.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs