Search code examples
sql-servervisual-studio-2012sql-server-data-tools

Create local db from TFS using automatic deployment


Let's say we have a Visual Studio 2015 project and a database project related (SQL Server 2014), each developer wants to have their local db on each machine. I want to create a kind of script in TFS that developers can regenerate their local db from TFS including some dictionary and mandatory data in some tables to make it runable.

There is something like pre- and post-deployment script, is there any interesting document related or video where I can find it for someone that never did this before?


Solution

  • It is pretty straightforward:

    • get your schema into ssdt / in .sql files
    • create a script to deploy to the local instance using ssdt or something like the command line version of redgate SQL compare
    • find a way to deploy static data using pre/post deploy scripts or some other way

    I tried to document how to do it with ssdt here:

    https://the.agilesql.club/taxonomy/term/34

    There are lots of tools to help just pick one and go with it, if you need help shout :)

    Ed