TeamCity - SQL Change Automation: Post Deployment Script failing before Build
fencalvin
Posts: 1 New member
The post deployment script to populate a table appears to be running before the build where the table would be created.
I saw Team City - SQL Change Automation (Build database) — Redgate forums (red-gate.com) and thought maybe the post deployment script is not being treated as a post deployment script. Perhaps the script is validated before actual creation, but the logs do show the table is created way before the error occurs.
`
Creating [dbo].[<Table>] VERBOSE: Creating [dbo].[<Table>]
...
...
WARNING: The error 'Invalid object name '<Table>'.' WARNING: The error 'Invalid object name '<Table>'.'
The build will work when code is deployed to build the table then another code deployment to populate the table.
(2 Team City builds in succession)
Is there somewhere else I can look to confirm or narrow down to?
I saw Team City - SQL Change Automation (Build database) — Redgate forums (red-gate.com) and thought maybe the post deployment script is not being treated as a post deployment script. Perhaps the script is validated before actual creation, but the logs do show the table is created way before the error occurs.
`
Creating [dbo].[<Table>] VERBOSE: Creating [dbo].[<Table>]
...
...
WARNING: The error 'Invalid object name '<Table>'.' WARNING: The error 'Invalid object name '<Table>'.'
occurred when executing the following SQL:
`
`
The build will work when code is deployed to build the table then another code deployment to populate the table.
(2 Team City builds in succession)
Is there somewhere else I can look to confirm or narrow down to?
Tagged:
Answers
Kind regards
Dan Calver | Redgate Software
Have you visited our Help Center?