laravel-saml2 icon indicating copy to clipboard operation
laravel-saml2 copied to clipboard

Do not use the default database to create the "tenant"

Open agracia-foticos opened this issue 3 years ago • 2 comments

Currently when actions are executed on the tenant, they are carried out on the default database.

Add new variable in the saml configuration to use a different connection driver than the "default"

agracia-foticos avatar Jul 05 '22 12:07 agracia-foticos

One of the solutions would be to run the migrations command with the --database option. If you have saml2_tenants in a different database, then you would also need to override the connection on the model.

I'd say this is not a common case, but I'd like to better understand your case and think about a more comprehensive solution rather than simply specifying a database connection on migrations.

breart avatar Jul 07 '22 17:07 breart

In our case, we have all the Saml configuration in a sqlite database and the application runs with the default database that is in MySql.

The default "tenant" model uses the default DB, which in our case is MySql

agracia-foticos avatar Sep 29 '22 09:09 agracia-foticos