I have limited experience with Ruby and Active Record, so this is a little tough for me. I need to update a new table in a new database with information still contained in the old table of an old database. I cannot connect to both databases at the same time.
My thinking is to write a script to grab the information from the old database and dump it to a text file (text1
). Then manually switch databases and do the same thing on the new database (text2
). Then I will compare both text files to output the differences in a new text file (text3
). And finally, I will somehow upload this to the new database. That is my pseudocode, at least.
Does anyone have any suggestions or example scripts of how to do this? How do I eventually convert the final text file (text3
) into an array or datatype that I will be able to use to update the new database table?
I understand this is a fairly general question, but I would really appreciate the help. Examples are great, information is great, resources are great, just anything to help me figure this out.