Hello, I have a data in a FileMaker database that I migrate to my evolving rails app via migrations via yaml. This works great because I can change my application schema easily, and then output a matching yaml file to migrate the data. The problem that I am having now is that I want to add text fields to the application, but the large chunks of text make my yaml file fail during migration. I would like to keep a simple text format for my data. Then migrate the data in this format to my rails application. I have explored using xml, but it adds too much complexity. Have thought of some combination of yaml for the simple fields and then xml for the few fields that contain large text blobs. I suspect that other''s have come across the same problem and may have some useful suggestions. Thanks in advance :-) - Pete --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Philip Hallstrom
2008-May-16 19:48 UTC
Re: Data Migrations using yaml, what to do about large text fields
> I have a data in a FileMaker database that I migrate to my evolving > rails app via migrations via yaml. > > This works great because I can change my application schema easily, > and then output a matching > yaml file to migrate the data. > > The problem that I am having now is that I want to add text fields to > the application, but > the large chunks of text make my yaml file fail during migration. > > I would like to keep a simple text format for my data. Then migrate > the data in this format > to my rails application. > > I have explored using xml, but it adds too much complexity. > > Have thought of some combination of yaml for the simple fields and > then > xml for the few fields that contain large text blobs. > > I suspect that other''s have come across the same problem and may have > some useful suggestions.Escape the text blobs in the yaml. Maybe turn them into base64 encoded strings. Or for each text field write it out to a real text file (unique filename) and reference that in the yaml. Not as elegant, but both should work.. and if this is motsly a one time thing, not too hackish :) --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---