I faced a small problem when I tried to deploy one of my database projects yesterday. The script.PostDepooyment was not executed at the end of my database deployment script. This script is very useful for me since I use it to fill some tables with idempotent static data. Static data for me is unknown dimensions members that have their surrogate keys smaller than 0 (-1, -2, etc.). By idempotent I mean that my insert scripts do not blindly try to insert data into tables, they check whether the row exists before inserting it:
So, back to Script.PostDeployment problem. I noticed that there is a property that can be set to every SQL scripts: BuildAction.
For my script, it was set at "Not in build", which means no execited:
By default, its property is set to "PostDeploy":
So what happened is guess was that "Someone" (read "ME") changed this property value by mistake.
Settting back this property to "PsotDeploy", my Script.Postdeployment was properly executed!
Leave a Reply