Bespoke Database Script deployment

hschmiedhschmied Posts: 2
edited July 17, 2013 6:36AM in Deployment Manager
We currently use a custom build process that already packages up all our SQL object changes into four separate scripts, one for each of the four databases it needs to be run against. Each of these scripts could contain SPs, views, table changes, update/creation scripts etc.

Without completely changing the way we work what would be the best way to get these four scripts deployed using Deployment Manager?

Do I have to nuget package them using RgPublish and/or sqlCl.exe or can I just add a post deployment step?

Any pointers would be greatly appreciated.

Comments

  • I believe they must be nuget packages... but you can also write a PreDeploy.ps1, Deploy.ps1 or PostDeploy.ps1 powershell script to execute whatever you need done.

    You can just use RgPublish to package the entire folder and depending which step you need done, the powershell script can run what you need custom done

    I'm not positive where the powershell is required to go, but I put it in the root and it runs there.
  • Yes, you can do this by packaging up your scripts together with a deploy.ps1 file using RGPublish

    The documentation on adding powershell behaviour to your package is here

    http://documentation.red-gate.com/displ ... ll+scripts

    while information about creating packages with RGPublish is here

    http://documentation.red-gate.com/displ ... n+packages

    If you're updating four different databases, however, I'd recommend setting them up as four separate "steps" in the same project. That way you'll be able to see the logging and status of each database separately, while ensuring that all four get deployed together.
    David Conlin
    Software Developer
    Deployment Manager
Sign In or Register to comment.