Click here to Skip to main content
16,013,642 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I develop for a small compnay, and i'm the only web developer here. We have a traditional website running, with database, and existing data.

We currently do not have a version control for our databases, however, they are being backed up.

I am new to database version control, and my scenario is this: If i make changes to the database, in the test server and migrate these changes to production server, what are my best options? without corrupting production server database integrity (Schema and data).

I am leaning toward Team foundation server (TFS) 2010. But, for this to work, do i need to have it installed on both my DEV machine and Production server? or can i just install TFS on my local machine, and migrate changes in the end?

Any suggestions to point me in the right direction would be very helpful. Also, i'm pretty fond of using Mercurial for code version control. Can the same be used for DB control? please guide me.

Thanks.
Posted

TFS costs a ton. You can buy tools like SQL Diff to diff between production and test databases and generate update scripts. Or you can just put a script in source control every time you do a change to the test server.
 
Share this answer
 
Comments
robroysd 7-Feb-12 12:19pm    
We have TFS available for download with Microsoft Subscription. Provided that, is it still a good approach over time to get familiar with TFS even for myself making up the team? please suggest. I will use the script backup in the mean time.
Christian Graus 7-Feb-12 12:21pm    
TFS is in general an awesome tool, I love it. If you have it, I would suggest using it, which would include using it's source control, etc, I would expect. But, I did not know it had any tool for diffing databases.
I would recommend you to stay with Mercurial or something else, but it always should be Open Source. The reason is not just money for the license. You cannot trust such critical assert as you code base to something which is proprietary and without source code. The biggest team using Open Source Revision Control systems tent to be much bigger. Thanks to open nature of the product, millions interested developer do their best to lick such code clean.

I would advise to consider Subversion, Git, Bazaar and Mercurial first.

Among other things, they are also very light-weight and flexible. Subversion needs a server, but code base can easily be moved across servers and different platforms without any risks. I also use it on every local computer, as a server. Many other systems can use Subversion storage system. Other three systems can be used in both centralized and distributed. The concept of distributed Revision Control System is very interesting and robust.

Please see this discussion first:
Revision control systems, which to choose from?[^].

See also my recent answers:
Needs some words of wisedom to set up and/or use a server[^],
Make an unclickable form[^],
How can i structured to arrange source code when i create a new solution[^].

Don't wait. Set aside all what you are doing and setup version control until it's too late.

—SA
 
Share this answer
 
Comments
robroysd 7-Feb-12 20:08pm    
For all my code, i use mercurial currently. Love the simple command prompt options. I couple it up with BitBucket.org. For private repositories, i've pushed code applications which are more than 1.8GB with video files for websites. It's perfect and secure. I didn't go for subversion, since lots of experienced programmers i worked with on an Internship, said, Mercurial is way better. Thank you for all the above info.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900