4

I am comparing the current version of my Database Project with a dacpac (previous version of the same database).

Then i hit the generate script button what gives me, as expected, the change script.

Unfortunately i does not add the Post deployment script to the change script.

If i use the "Publish Database" feature and compare against a "real" db it creates a update script with the post deploy script but i require this feature in the schema compare.

Is there any option i overlooked?

How did you solved the problem?

1 Answer 1

5

You need to actually publish the project to use the Post-Deploy and Pre-Deploy scripts. The Post-Deploy script is not part of the SQL Compare. The SQL Compare option only compares actual database options. I'd recommend using the Publish command, setting your options the way you want, then saving that as part of the project. You can easily use that to generate a script. You'll need to compare against a real database anyway in order to do a schema comparison, so this should be very similar to the option you're already using.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.