Is there any way to force the dependencies between database objects when creating a database from scratch from Source Control?
We have an issue on a few of our database tables where we have a default constraint that uses an user defined function to get a value. The function uses some standing data to provide the default value.
This means we have a dependency chain on the creation of the standing data table > function > table using function as a default constraint.
In our current (less than ideal) script-based solution this is no problem as we hand craft the scripts in the correct order.
I realize that this is an unusual situation, I wondered if there was any way to overcome it with a consistent automated approach?