Every time we are trying to deploy this to from Power Platform DEV to QA or PROD Env. we are having this issue with Unique Key constraint.. We created the New Env. Variable to see if that Fixed this issue but it's caused the same error when we tried to redeploy the same solution again to same env. We have few enhancements to current applications.
ImportAsHolding failed with exception :Cannot insert duplicate key exception when executing non-query: System.Data.SqlClient.SqlCommand Exception: System.Data.SqlClient.SqlException (0x80131904): Violation of UNIQUE KEY constraint 'ndx_envvarval_schemaname'. Cannot insert duplicate key in object 'dbo.EnvironmentVariableValueBase'. The duplicate key value is (kpapps_HuntAppsSPSite, 0, Jan 1 1900 12:00AM). The statement has been terminated. at Microsoft.Crm.CrmDbConnection.HandleExecutionExceptionAbstract(Exception exception, String commandText, IDbConnection connection, IDbCommand command, IDbTransaction transaction, Boolean isOpen, Int32 commandTimeout, IConnectionRetryPolicy localRetryPolicy, Int32& retryCount) at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetryAbstract[TResult] at Microsoft.Crm.CrmDbConnection.<>c__DisplayClass238_0.