I am from an clientside language programming background, particularly ActionScript. So although I am fairly code aware I have little server side experience, particularly version charge of databases together with the rails application itself. After which there is the command line the industry complete mystery.

At this time I am building my first rails application and appears fairly nice on my small local machine. I believe now it's time I began setting up some version control. Most books brush over version control stuff however it appears more difficult than building the rails application, that is going along ok. So my questions are:

  • How to start learning these items?
  • Can One version control the database using the rails application together?
  • Is this for a longer period consuming and complex that building the rails application itself?
  • You learn this kinda stuff simply by searching around, and seeking things out, there's no substitute. Others are only able to suggest which tool is better for which your attempting to do, but everybody has their very own opinions so..yea..simply do it!

  • Personally, i don't understand how to version control a Database, but as for general version determining your code I recommend "git"(Link here!). It is among the simplest and many popular Version Control systems around. Initially designed by Linus Torvalds, and it is now maintained by ....

  • Yes/No, for the way you define complicated. To produce version control for the code using "git", you'd initially key in

    git init

    within the directory from the code. And also to add all of the code to git, to inform it to keep close track of alterations in the files, you'd type:

    git add *

    after which to commit(save your valuable changes), you'd key in:

    git commit -m "Key in that which you have done to date"

    And thats virtually there's to git, you'd repeat the final two steps to include and save your valuable changes as you develop your code. If you have done a problem for your code all you need to do is think back at the "commits" and choose in which you want to back track.

    So Yea git is fairly awesome, there are others nevertheless its less nice during my opinion. They're: SVN, Resumes.

Returning to version determining your database, Why would you like to do this? Rails includes a built-in Database version control, any time you alter the plan of the database, its recorded, if you did a problem you could revert back! Have you mean creating a backup of the Database DATA?? Cause if it's MySQL, you could export it in xml, and version control that xml file!

Obtaining a version control system like Subversion or Git may be the easy part.

Hard part is determining steps to make everything make use of a database. It isn't the identical factor as code.

For instance, are you going to archive just schema history or data too? (Most likely the previous, but who knows.) How would you manage loading data (e.g., for test situations)?

Scott Ambler and Pramod Sadalange did some focus on coping with agile databases. They recommend scripting all schema changes, and using them so as, to create a schema up to and including particular version. Maybe this is a great starting point.