Its a piece of cake developing applications that run on multitude of Database management solutions.
All you need to keep Database schema scripts handy. Here is how you do it using rails scripts:
> ruby script\generate migration Contact
This will create an empty file in db/migrate folder for contact table. You need to fill it now with the fields you want
for eg:
Ok.. just found what I was looking for. Pretty detailed document for this: http://rubyonrails.org/api/classes/ActiveRecord/Migration.html
Now, apply the migration
> rake migrate
Now, generate model and controller for Contact
> ruby script\generate scaffold Contact
This entry was posted
on Thursday, April 6th, 2006 at 2:34 pm and is filed under Ruby.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Leave a reply
You must be logged in to post a comment.