What are the challenges you face when working across database platforms? Take the survey
Options

TeamCity - SQL Change Automation: Post Deployment Script failing before Build

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>'.'
  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

  • Options
    The issue here is being investigated directly in a support ticket and the current summary is down to it referencing an object in another database and it's unavailable in the deployment environment 

    Kind regards

    Dan Calver | Redgate Software
    Have you visited our 
    Help Center?

Sign In or Register to comment.