From c3bda8543ac8f0cc0062eddfd5aa41b5bcd575fd Mon Sep 17 00:00:00 2001 From: Samuel Stancl Date: Sun, 26 Jul 2020 22:30:07 +0200 Subject: [PATCH] Update multi-database-tenancy.blade.md --- source/docs/v3/multi-database-tenancy.blade.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/docs/v3/multi-database-tenancy.blade.md b/source/docs/v3/multi-database-tenancy.blade.md index c55805a..9334c0a 100644 --- a/source/docs/v3/multi-database-tenancy.blade.md +++ b/source/docs/v3/multi-database-tenancy.blade.md @@ -6,4 +6,20 @@ section: content # Multi-database tenancy {#multi-database-tenancy} -TODO +The package comes with all the tooling necessary for multi-database tenancy. + +## TenantDatabaseManagers {#tenantdatabasemanagers} + +TenantDatabaseManagers are classes which manage tenant databases — they primarily take care of creating and deleting them. + +There are database managers for all Laravel-supported DB drivers (MySQL, PostgreSQL, SQLite). There's also a database manager for using a single database, but multiple schemas (one per tenant) with PostgreSQL. + +See the `database` section of the tenancy config for more details. + +## Commands {#commands} + +There are also commands for working with tenant databases. Namely, `tenants:migrate` and `tenants:seed`. See the [console commands page]({{ $page->link('console-commands') }}) of the documentation. + +## Jobs & Listeners {#jobs-listeners} + +By default, when a tenant is created, there's also a database created for him. This is done using a JobPipeline listener in the `TenancyServiceProvider`. See the [event system page]({{ $page->link('event-system') }}) of the documentation.