Hello. So I'm trying to make something like tenancy but not fully.
I have that table structure in my main (system) database:
Offices:
- id
- name
- description
- district_uuid (string)
Districts:
- id
- uuid (string) (related to `Offices.district_uuid`)
- display_name
- database_name (Every district has his own database)
And my other migrations for every database are structured like this:
Tablename:
- column1
- column2
- office_id (related to Main Offices table.)
So i want every model that has office_id to make insert,write,create,delete queries to the correct database based on office->district->database_name.
I also has read & write connections.
Is that going to make the issue more bigger ?
Please give me any suggestions. Can I use this package or I must to coding this logic myself. :)
Hello. So I'm trying to make something like tenancy but not fully. I have that table structure in my main (system) database:
And my other migrations for every database are structured like this:
So i want every model that has office_id to make
insert
,write
,create
,delete
queries to the correct database based onoffice->district->database_name
. I also hasread & write
connections. Is that going to make the issue more bigger ?Please give me any suggestions. Can I use this package or I must to coding this logic myself. :)