dwormuth
2011-Feb-02 12:30 UTC
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 data definitions and require a different schema to be presented to the end-users. My end users will be at different versions of the external data schema and have legacy data that needs to remain available when they upgrade to the new schema. 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 vestal_versions. My thoughts on this process is to use a flag to indicate which version the 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 is required. Wondering if someone has a more elegant solution or experience with a similar situation and wants to share. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Michael Graff
2011-Feb-02 19:47 UTC
Re: Rails Apps that need to present different versions of model schemas
You might also consider a schemaless database, like MongoDB as the storage. Then you can make arbitrary changes without changing a schema at all. --Michael -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Reasonably Related Threads
- Fastes database server for...
- RFC: LNT/Test-suite support for custom metrics and test parameterization
- Using ActiveRecord 3.0.x with Ruby 1.9.2
- RFC: LNT/Test-suite support for custom metrics and test parameterization
- Finding HTML attributes with jQuery in Rails 3.1