In environments that support multiple packages per customer, there is the possibility to change where will  a Package Extension (eg. Email Addon) be assigned to.


For that we need 2 things:

- PackageId from the hosting subscription as seen when Editing it via Admin Panel (or from AtomiaBilling..subscription_custom_attribute table).

Under Other Data , PackageId : Some_UniqueIdentifier_here (eg.f44444444-3333-2222-111111111) 

- PackageExtensionId from the Addon subscription as seen when Editing it via Admin Panel (or from AtomiaBilling..subscription_custom_attribute table).

Under Other Data, PackageExtensionId : Some_number_here (eg.42)


From there, we go to DB and query table AtomiaProvisioning2..extending_packages for that PackageExtensionId, in order to see which package that extension is assigned to.

eg. select fk_pid from AtomiaProvisioning2..extending_packages where id='42' -- based on above example


And, subsequently, we can alter that by doing an update:

begin tran

 update AtomiaProvisioning2..extending_packages 

set fk_pid='f44444444-3333-2222-111111111' -- based on above example

where id='42'

--rollback

--commit



Note: on a relevant note, it's possible to change the limit of an Addon straight from DB through table ext_packages_limits but it's not advisable as it will not reflect the subscription to service quota as seen by setting the package limits in ProvisioningDescription.xml


PS. The following (--) indicates comments in MSSQL syntax , so don't select it or remove it when you want to commit or rollback your transaction