On Thu, Apr 8, 2010 at 8:20 AM, johnnybutler7
<johnnybutler7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:
> If its not done correctly then further
> down the line there could be serious issues as data may be lost etc...
>
I don''t think you''re realistically going to avoid having a
huge headache if
you don''t do the migration correctly the first time. And if you try to
hack
in some automatic record reconciliation logic into your system, you will
forever pay the price of that in terms of application complexity,
performance, inflexibility, and unmaintainability moving forward.
My recommendation is to make extra sure your migration logic from the old
schema/table to the new one is 100% correct, then backup your DB, do your
migration, and live a happy new life. Get your data clean, don''t hamper
yourself trying to sit on the fence between fixing the data and leaving it
in a broken state.
Also, I''m not aware of any technology (Rails or DB-level) which will
let you
somehow automatically alias old rows to new rows when doing joins. Joins are
not that smart. You''d probably need to write custom SQL which gets the
initial results, then checks them for bad rows, then patches in correct data
where needed, etc. It''d be a mess!
my 2c
jsw
--
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.