How are programmable objects ordered among themself to be deployed?
I understand that programmable objects are deployed at the very end. My question is related to just programmable objects and their deployment order among themselves (view first, then function, then procedure, etc.). It seem readyroll order the programmable objects during baseline creation. Does it do any ordering of new programmable objects that's added after baseline?
We are running into any issue where readyroll is deploying a function first then a view and the function is dependent on the view. In sql, you can create a function even if that view doesn't exist yet (get a warning). Which is why readyroll deploy the function first and the view second. But if a couple of days passes and the view and function are modified to query back a new column. The deployment of creating that function would error out because the view now exists but the new column it's looking for doesn't exist on that view because that view is being deployed AFTER the function.
I know we can manually change the ordering in the project settings (via drag and drop) but I was wondering why readyroll isn't detecting this dependency and re-order the deployment to do the view first then the function? Is it that after baseline creation, it's up to the developer to order new programmable objects?
Thank you
We are running into any issue where readyroll is deploying a function first then a view and the function is dependent on the view. In sql, you can create a function even if that view doesn't exist yet (get a warning). Which is why readyroll deploy the function first and the view second. But if a couple of days passes and the view and function are modified to query back a new column. The deployment of creating that function would error out because the view now exists but the new column it's looking for doesn't exist on that view because that view is being deployed AFTER the function.
I know we can manually change the ordering in the project settings (via drag and drop) but I was wondering why readyroll isn't detecting this dependency and re-order the deployment to do the view first then the function? Is it that after baseline creation, it's up to the developer to order new programmable objects?
Thank you
Tagged:
Answers
As a workaround, the resetting of the order can be manually triggered as follows:
- Right-click the project in the Solution Explorer and select Unload Project, and then Edit <ProjectName>.sqlproj
- Find and delete the DeployChangesExecutionOrder element and its contents
- Save and then right-click the project and select Reload Project
When you next import a programmable object (or alternatively, click the Import all Programmable Objects button in the project designer), the order will be set again by ReadyRoll.Product Manager
Redgate Software