The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Migrating Old DBs with Migrations

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Stewart

Posts: 72
Nickname: estewart
Registered: Dec, 2003

Eric Stewart is software developer from Austin, Texas.
Migrating Old DBs with Migrations Posted: Nov 19, 2005 9:29 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eric Stewart.
Original Post: Migrating Old DBs with Migrations
Feed Title: Ponderings On Ruby
Feed URL: http://blog.eric-stewart.com/category/programming-ruby.rss
Feed Description: This is the Ruby related section of Eric Stewart's weblog. These entries will be the commentary of a long time Java/C++ programmer that started exploring Ruby in 2003.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eric Stewart
Latest Posts From Ponderings On Ruby

Advertisement

One of the big advantages of Rails and ActiveRecord in particular is the ease of maintenance and small code size when you follow the conventions that ActiveRecord expects.

Over the past 6 months I have read several accounts of people wanting to adapt an existing web application to Rails, preferably preserving the database. A common pain expressed is that you lose many of the benefits of ActiveRecord if you have to configure your application to understand a datase that doesn’t follow the conventions it prefers.

ActiveRecord now has Migrations, which are intended to version and adapt an existing database as your application changes, typicall through development/deployment cycles. But what if we use migrations to adapt the database from another application that we are rewriting in Rails?

Right now it seems very practical if you document the exact version of database from the original application. Because you won’t have ActiveRecord model classes for the original database there will be some direct SQL required in most cases. That might leave you with a nice upgrade path from the original application as well (at least one particular version of it).

My current project hasn’t taken advantage of migrations yet but will soon (more on that later). It is a new project with a new database however.

I have an itch to try porting at least one open source application I use to Rails for my own convenience. Maybe I’ll give this a try. Has anyone done this yet?

Read: Migrating Old DBs with Migrations

Topic: Dabble clip Previous Topic   Next Topic Topic: JSON Closer to YAML, But No Cigar (Thanks Alot, Whitespace!)

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use