Dear support,
We have 1 host database, and multiple separate tenant databases for those tenants with large amount of own data.
Host database stores some common host data, such as tenants / editions tables. Because of primary / foreign key enforcement, we have to replicate these host data to every separate tenant database.
Do you have a way to maintain these? For example, when creating a new separate tenant database, we need to copy host data; when tenant information changed in the host database, we have to replicate manually to each separate tenant database. Would you recommend a better way?
Thanks Richard
1 Answer(s)
-
0
Hi @arctechnicalteamaus,
Why do you need those data (Tenants, Editions etc...) in Tenant databases ? Is it for some reports etc... If you want to handle this syncronization via code, you can use https://aspnetboilerplate.com/Pages/Documents/EventBus-Domain-Events.
You can write a syncronizer class similar to https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Zero.Common/Authorization/Users/UserAccountSynchronizer.cs which can directly switch to target tenant's context and insert data to target database.
Thanks,