I have 4 tenants – dev1,dev2,dev3,dev4
and i am using spring boot, postgress database and flywaydb Migration to database version and auto create when new tenant registered.
Base code : https://github.com/AnarSultanov/examples/tree/master/schema-based-multi-tenancy
https://sultanov.dev/blog/schema-based-multi-tenancy-with-spring-data/
in my sql scripts i have added foreign key but after flyway db initializes and app runs
all foreign key for each schema/table are referring to all schema
one schema can access another forignkey table reference
Foreign keys are creating number of tenant present