From 3c4bda178f96af1d4cb77e69691883529b8ddd09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Thu, 6 Jan 2022 16:52:25 +0100 Subject: [PATCH] Add a note about https://github.com/archtechx/tenancy/issues/774 --- source/docs/v3/customizing-databases.blade.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/docs/v3/customizing-databases.blade.md b/source/docs/v3/customizing-databases.blade.md index eb1fbd1..859fcc7 100644 --- a/source/docs/v3/customizing-databases.blade.md +++ b/source/docs/v3/customizing-databases.blade.md @@ -51,6 +51,8 @@ Note that you don't want to grant the users the ability to grant themselves more ## Specifying template connections {#specifying-the-template-connections} +> **Important:** there should be no `tenant` connection in `config/database.php`. If you create a template connection for tenants, name it something like `tenant_template`. The `tenant` connection is entirely managed by the package and gets reset to `null` when tenancy is ended. + To specify the connection that should be used to construct this tenant's database connection (the array like you'd find in `config/database.php`, set the `tenancy_db_connection` key. Otherwise, the connection whose name is in the `tenancy.database.template_connection` config will be used. If that key is null, the central connection will be used. ## Specifying other connection details {#specifyng-other-connection-details} @@ -62,4 +64,4 @@ You may also set specific connection details without necessarily creating a new - optionally, the username and password - all `tenancy_db_*` keys -This means that you can store a value for e.g. `tenancy_db_charset` if you want to specify the charset for the tenant's database connection for whatever reason. \ No newline at end of file +This means that you can store a value for e.g. `tenancy_db_charset` if you want to specify the charset for the tenant's database connection for whatever reason.