How can we help you today? How can we help you today?

Is it possible to have a "post Get latest" script?

After doing a "Get latest" on my local database, I would like to run a tool that generates code from my updated database.

Is there functionality for a post "Get latest" script? Or executing a batch or something to that extent?
Louis_Gigantisch
0

Comments

6 comments

  • DanC
    Hi @Louis_Gigantisch unfortunately this isn't a feature within SQL Source Control, if however you'd like to make a suggestion this can be made here - https://redgate.uservoice.com/forums/39019-sql-source-control

    Alternatively, if I'm understanding the scenario correctly you can use SQL Compare to compare the branch from Source Control to the live database and generate a deployment script that way. 

    Hope this helps!

    DanC
    0
  • Louis_Gigantisch
    Thanks for your response. The post script I'm hoping to execute is not for deployment, but solely for development, but I'll have to look into the options there; maybe that will be viable.
    Louis_Gigantisch
    0
  • DanC
    You're welcome! if you have any other issues or questions please don't hesitate to contact us at support!
    DanC
    0
  • David Atkinson
    Thanks for your response. The post script I'm hoping to execute is not for deployment, but solely for development, but I'll have to look into the options there; maybe that will be viable.
    @Louis_Gigantisch - Out of interest, what is your post script doing? Knowing this would help us suggest a solution. One option that springs to mind is trying to use xp_cmdshell in a post-deployment script.

    David Atkinson
    0
  • Louis_Gigantisch
    We have an ASP.NET project that generates code from the database using SQLMetal. Currently, we run SQLMetal on every project build, but ideally it only runs when the database has changed. Running it only after every "Get latest" would be preferable.
    Louis_Gigantisch
    0
  • David Atkinson
    We have an ASP.NET project that generates code from the database using SQLMetal. Currently, we run SQLMetal on every project build, but ideally it only runs when the database has changed. Running it only after every "Get latest" would be preferable.
    I see. The only option I can think of is if you create a batch file and use the SQL Compare command line instead of the built in "get latest" feature. This way you can configure the SQLMetal command to run afterwards.
    David Atkinson
    0

Add comment

Please sign in to leave a comment.