Changing Locked Package dependencies after they are deployed

We found some validation errors indicating we have a package hierarchy issue on an older package that already deployed to production.  To resolve this, we need to unlock some packages and change their dependencies.  While I am able to unlock them with the following script below, I still can't change the package dependencies even when unlocked.  How can I change the package dependencies on a package that has already deployed?

DECLARE @packageName nvarchar(50); 
SET @packageName = 'Package_Name'; 
UPDATE SysPackage 
SET IsChanged = 0, 
    InstallType = 1, 
    IsLocked = 0, 
    Maintainer = 'Customer' 
WHERE Name = @packageName 
AND SysWorkspaceId IN (SELECT 
  Id 
FROM SysWorkspace 
WHERE Name = 'Default'); 
UPDATE SysSchema 
SET IsChanged = 0, 
    IsLocked = 0
FROM SysSchema 
JOIN SysPackage 
  ON SysSchema.SysPackageId = SysPackage.Id 
WHERE SysPackage.name = @packageName 		
Like 1

Like

0 comments
Show all comments