I find agencyid in the following tables: affiliates (websites), agency (accounts), channel (targeting channels), clients (advertisers). This means that if I change a website from one account to another, I should change agency in affiliates, clients and maybe in channels if I have any channels bound to that website. What could go wrong?
You mean that if the same advertiser is used in many websites under the old account, then there is problems to move it? But if no advertiser is used in any website that remains under the old account, there shouldn't be any problem?