Upgrade to Pro — share decks privately, control downloads, hide ads and more …

dbImportPresentation.pdf

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for Adam Weis Adam Weis
November 28, 2012
30

 dbImportPresentation.pdf

Avatar for Adam Weis

Adam Weis

November 28, 2012
Tweet

Transcript

  1. What changed? A lot. Instructors are now a table, not

    a row in Courses Wednesday, November 28, 12
  2. What changed? A lot. Instructors are now a table, not

    a row in Courses Completely new relationships with “Group” join table Wednesday, November 28, 12
  3. What changed? A lot. Instructors are now a table, not

    a row in Courses Completely new relationships with “Group” join table etc. Wednesday, November 28, 12
  4. Solution Write a database importer script! Query both databases simultaneously

    to import legacy data into new schema! Wednesday, November 28, 12
  5. Database importer ingredients Establish a new ActiveRecord connection with old

    database Recreate all legacy model relationships Wednesday, November 28, 12
  6. Database importer ingredients Establish a new ActiveRecord connection with old

    database Recreate all legacy model relationships Create the to_model methods Wednesday, November 28, 12
  7. Database importer ingredients Establish a new ActiveRecord connection with old

    database Recreate all legacy model relationships Create the to_model methods Write the driver Wednesday, November 28, 12
  8. Citations Vincent Siao (SCS & HCI 2014) Jason MacDonald (SCS

    2013) Steven Fackler (SCS 2013) Wednesday, November 28, 12
  9. Citations Vincent Siao (SCS & HCI 2014) Jason MacDonald (SCS

    2013) Steven Fackler (SCS 2013) Tim Riley: http://openmonkey.com/blog/2009/05/02/ importing-legacy-data-in-rails/ Wednesday, November 28, 12
  10. Citations Vincent Siao (SCS & HCI 2014) Jason MacDonald (SCS

    2013) Steven Fackler (SCS 2013) Tim Riley: http://openmonkey.com/blog/2009/05/02/ importing-legacy-data-in-rails/ https://github.com/aweis/rails_importer/blob/master/ S13importer.rb Wednesday, November 28, 12