Options

How to link database to an existing project in TFS?

SamuelVSamuelV Posts: 3
Can we link database to an existing project in TFS?

It seems we've to link to an empty folder, but if we do that won't we lose history of existing source code in TFS?

How should we preserve that version history? This might be obvious, but I'm confused. Appreciate your help!

~Sam.

Comments

  • Options
    Ah, got it. I've to create a new empty database and link it to source control and do a get latest.
  • Options
    As well as linking a blank one, you can also link an existing database to a folder representing a source controlled database.

    David Atkinson
    Red Gate
    David Atkinson
    Product Manager
    Redgate Software
  • Options
    David, I read your reply but I still don't get it. How do I link an existing db with an existing database project in TFS? If I choose my existing project it tells me it must be an empty folder. Then I literally get linked to an empty folder and not my existing project. I am very confused.
    TIA
    -VG
  • Options
    Are you trying to link to a dbproj "Data Dude" (or DBPro) database project? If so, you're right that this wouldn't work. We only support the newer SSDT database project type (sqlproj), and even this needs this "beta" build, as we are still in the feedback-gathering stage. It can be downloaded here:

    http://www.red-gate.com/SQLSourceContro ... olsSupport

    Kind regards,

    David Atkinson
    Product Manager
    Red Gate
    David Atkinson
    Product Manager
    Redgate Software
  • Options
    Hi David, we are trying to link to a Visual Studio 2008 Database Project (dbproj). We want to upgrade to SQL12 but the new versions of the SQL projects (sqlProj for SSDT) do not give us the same level of functionality as the VS 2008 used to, so I was hoping to convert our VS 2008 db projects into Redgate to see if that works for us better than SSDT. Do we have to start our source-control over from scratch then? And if so, when I link to a blank TFS project, how come "Get Latest" doesn't download all the objects to our file system? I want to be able to execute a stored proc against multiple databases (test, then staging, then prod if the first two go well), and I'm not sure how your interface allows for that.

    Thanks
    -VG
  • Options
    Can someone help me on this question? When I link to a blank TFS project, how come "Get Latest" doesn't download all the objects to our file system?
  • Options
    SQL Source Control can only link a database to an entirely blank folder, which is what you would need to do if you want to start source controlling your database, or it can link to a pre-existing source controlled folder. This pre-existing folder can be a Red Gate-created one (has a redgate.ssc file in it) or an SSDT project (has a sqlproj file).

    If you have a dbproj folder then SQL Source Control will not recognize it.

    I'm guessing that you must have created an SSDT (sqlproj) database project if you managed to link it. If this is blank and the database has objects then the next step would be to "Commit" the objects. "Get Latest" will be blank as there's nothing to "get".

    David
    David Atkinson
    Product Manager
    Redgate Software
  • Options
    Thank you David. I did do a blank project just to try to get something working. I think I get it now - I am used to "Commit" meaning that the source-controlled changes are committed to the database, and "Get Latest" meaning that the objects are downloaded from source control to the file system. It appears that this means the oppposite in Redgate so that will take some getting used to, but I have been able to populate the source-controlled objects now after "committing".
    -VG
  • Options
    That's great news. Do let us know how you get on. Any feedback we get on the database project functionality in the coming weeks will help us determine what needs doing to release this feature with the full product.
    David Atkinson
    Product Manager
    Redgate Software
Sign In or Register to comment.