I a working with VS, TFS and SSMS 2012. We use TFS source control for our source code solution. I've decided to add our database to source control as well. I tried different ways:
Creating a new SQL project in VS, adding to source control, importing data bases to project, checking in
Creating new project in SSMS, adding to source control, creating scripts from existing data bases to project, checking in.
I don't like first solution because every time you change some things in SSMS, you should do schema compare in VS, then check in.
And I don't like second way either. Every time you change some thing, you should re script changes to project and then check in
Is there anyone who know how I can do that without using Red Gate?
Thanks in advance for your help.
In #1 you put the schema under source control and from then on you work against the schema, not the live database. As you make changes you can 'compile' and publish the result to your local DB.
In #2 you continue to make changes against a database and script the changes into source control. If you want to be productive in this mode you need a tool like ReadyRoll or Redgate.
Your database should be under source control, and this is how you do it.