1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 00:14:04 +00:00
tenancy/assets
Abrar Ahmad bf504f4c79
[4.x] Use a dedicated DB connection for creating/deleting tenant databases (#946)
* create host connection for creating, deleting tenants

* purge connection and add more tests

* remove unused method

* Improvements

* test named

* remove host connection name config key

* Revert "remove host connection name config key"

This reverts commit 42acb823e8.

* Update DatabaseConfig.php

* Update assets/config.php

Co-authored-by: Samuel Štancl <samuel@archte.ch>

* Update DatabaseConfig.php

* todo and comments

* remove debug code

* Update DatabaseConfig.php

* strict assertions

* Update TenantDatabaseManagerTest.php

* Update src/Database/DatabaseConfig.php

Co-authored-by: Samuel Štancl <samuel@archte.ch>

* purge connection improvements

* Update DatabaseConfig.php

* Update DatabaseConfig.php

* Update DatabaseConfig.php

* improve comments

* remove "ensuring connection exists" check

* remove test because it's duplicate

* removing test because other two tests are using the same logic, so this test kinda already covered

* Update TenantDatabaseManagerTest.php

* Update DatabaseConfig.php

* Revert "Update TenantDatabaseManagerTest.php"

This reverts commit b8e0a1c982.

* add default

* Update src/Database/DatabaseConfig.php

Co-authored-by: Samuel Štancl <samuel@archte.ch>

* update comment

* remove unness mysql config and add a comment

* tenancy_db_connection tenant config test

* Update TenantDatabaseManagerTest.php

* update test name and improve assertions

* typo

* change inline variable name

* Update TenantDatabaseManagerTest.php

* Update TenantDatabaseManagerTest.php

* add DB::purge() calls

* add new assertions [ci skip]

* Fix code style (php-cs-fixer)

* replace hostManager with manager

* fix test

* method rename

Co-authored-by: Samuel Štancl <samuel@archte.ch>
Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
Co-authored-by: PHP CS Fixer <phpcsfixer@example.com>
2022-10-31 12:13:54 +01:00
..
impersonation-migrations Fix asset publishing 2020-05-17 15:14:05 +02:00
migrations [4.x] Don't use onDeleteCascade in the migrations (#883) 2022-07-20 13:02:33 +02:00
config.php [4.x] Use a dedicated DB connection for creating/deleting tenant databases (#946) 2022-10-31 12:13:54 +01:00
routes.php Add identification section to config, refactor static properties 2022-10-01 20:01:18 +02:00
TenancyServiceProvider.stub.php Add maintenance mode events (#979) 2022-10-17 19:48:24 +02:00
tenant_routes.stub.php Fix tenants:list 2020-05-29 09:33:49 +02:00