If we need to map a new subcontract to a broker site so that it will show offices and agents from both subcontracts. Please follow the below steps.
Get associated subcontract for the broker site. You can get this from tbl_site_mgmt_parent_url using the URL of the broker site.
Get the new subcontractid from the ticket.
Insert record into tbl_subcontract_site_map with associated subcontractid and new id.
For example for this ticket - https://trello.com/c/4k3Ro9GI, I ran the below script.
insert into tbl_subcontract_site_map (primaryid,mapid)