Getting Pre-update schema check failed when using the Release widget in VSTS
patelrk
Posts: 13 Bronze 1
Hi I'm getting this when i'm trying to release changes from a Perform Create step in VSTS. Is there a way to find out what is actually making it fail in the Pre-auth check? Is there a verbose flag or something?
2017-08-23T09:26:46.9021784Z Checking target database schema is in expected state before applying update.
2017-08-23T09:26:48.1021787Z Comparing the schema in the Database Release object (created at 23/08/2017 10:26:26 +01:00) to the current schema of database 'DB1' on server 'Server1'.
2017-08-23T09:26:55.1907333Z Target database schema is not in the expected state.
2017-08-23T09:26:55.1947329Z Checking if target database schema matches Source schema.
2017-08-23T09:26:56.3867321Z Comparing the schema in the Database Release object (created at 23/08/2017 10:26:19 +01:00) to the current schema of database 'DB1' on server 'Server1'.
2017-08-23T09:27:03.4889830Z ##[error]System.Management.Automation.CmdletInvocationException: Pre-update schema check failed: the schema in the Database Release object (created at 23/08/2017 10:26:26 +01:00) and database 'DB1' on server 'Server1' are different, or static data is different. ---> RedGate.DLMAutomation.Shared.Errors.TerminatingException: Pre-update schema check failed: the schema in the Database Release object (created at 23/08/2017 10:26:26 +01:00) and database 'DB1' on server 'Server1' are different, or static data is different.
2017-08-23T09:27:03.4889830Z at RedGate.DLMAutomation.Compare.Commands.DatabaseReleaseExecutor.ApplyDatabaseRelease(DatabaseRelease databaseRelease, DatabaseConnection deployToDatabase, Boolean skipPreUpdateSchemaCheck, Boolean skipPostUpdateSchemaCheck, Int32 commandTimeout)
2017-08-23T09:27:03.4889830Z at RedGate.DLMAutomation.PowerShell.Commands.UseDlmDatabaseReleaseCommandImpl.Process()
2017-08-23T09:27:03.4889830Z at RedGate.DLMAutomation.PowerShell.DlmAutomationCommandImpl`1.ProcessRecord()
2017-08-23T09:27:03.4889830Z at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation)
2017-08-23T09:27:03.4889830Z --- End of inner exception stack trace ---
2017-08-23T09:27:03.4889830Z at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-08-23T09:27:03.4889830Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-08-23T09:27:03.4889830Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-08-23T09:27:03.4889830Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-08-23T09:27:03.4889830Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-08-23T09:27:03.4889830Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
2017-08-23T09:27:05.5156337Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
2017-08-23T09:26:46.9021784Z Checking target database schema is in expected state before applying update.
2017-08-23T09:26:48.1021787Z Comparing the schema in the Database Release object (created at 23/08/2017 10:26:26 +01:00) to the current schema of database 'DB1' on server 'Server1'.
2017-08-23T09:26:55.1907333Z Target database schema is not in the expected state.
2017-08-23T09:26:55.1947329Z Checking if target database schema matches Source schema.
2017-08-23T09:26:56.3867321Z Comparing the schema in the Database Release object (created at 23/08/2017 10:26:19 +01:00) to the current schema of database 'DB1' on server 'Server1'.
2017-08-23T09:27:03.4889830Z ##[error]System.Management.Automation.CmdletInvocationException: Pre-update schema check failed: the schema in the Database Release object (created at 23/08/2017 10:26:26 +01:00) and database 'DB1' on server 'Server1' are different, or static data is different. ---> RedGate.DLMAutomation.Shared.Errors.TerminatingException: Pre-update schema check failed: the schema in the Database Release object (created at 23/08/2017 10:26:26 +01:00) and database 'DB1' on server 'Server1' are different, or static data is different.
2017-08-23T09:27:03.4889830Z at RedGate.DLMAutomation.Compare.Commands.DatabaseReleaseExecutor.ApplyDatabaseRelease(DatabaseRelease databaseRelease, DatabaseConnection deployToDatabase, Boolean skipPreUpdateSchemaCheck, Boolean skipPostUpdateSchemaCheck, Int32 commandTimeout)
2017-08-23T09:27:03.4889830Z at RedGate.DLMAutomation.PowerShell.Commands.UseDlmDatabaseReleaseCommandImpl.Process()
2017-08-23T09:27:03.4889830Z at RedGate.DLMAutomation.PowerShell.DlmAutomationCommandImpl`1.ProcessRecord()
2017-08-23T09:27:03.4889830Z at RedGate.PowerShell.CommandBase`2.DelegateTo(Action doImplementation)
2017-08-23T09:27:03.4889830Z --- End of inner exception stack trace ---
2017-08-23T09:27:03.4889830Z at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-08-23T09:27:03.4889830Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-08-23T09:27:03.4889830Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-08-23T09:27:03.4889830Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-08-23T09:27:03.4889830Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-08-23T09:27:03.4889830Z at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
2017-08-23T09:27:05.5156337Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
Tagged:
Best Answer
-
patelrk Posts: 13 Bronze 1I got around the problem by creating a step before creating the release script, using the DLM Release 2 widget to copy the production schema over the top of the test database schema. The create the release script, then deploy. That seemed to work.