diff --git a/assets/2019_09_15_000020_create_tenant_user_impersonation_tokens_table.php b/assets/2020_05_15_000010_create_tenant_user_impersonation_tokens_table.php similarity index 100% rename from assets/2019_09_15_000020_create_tenant_user_impersonation_tokens_table.php rename to assets/2020_05_15_000010_create_tenant_user_impersonation_tokens_table.php diff --git a/assets/config.php b/assets/config.php index 9ec3b5d2..1e23b045 100644 --- a/assets/config.php +++ b/assets/config.php @@ -47,12 +47,6 @@ return [ * Database tenancy config. Used by DatabaseTenancyBootstrapper. */ 'database' => [ - /** - * The connection that will be used as a template for the dynamically created tenant connection. - * Set to null to use the default connection. - */ - 'template_connection' => null, - /** * Tenant database names are created like this: * prefix + tenant_id + suffix. @@ -177,6 +171,7 @@ return [ * understand which ones you want to enable. */ 'features' => [ + // Stancl\Tenancy\Features\UserImpersonation::class, // Stancl\Tenancy\Features\TenantConfig::class, // https://tenancy.samuelstancl.me/docs/v2/features/tenant-config/ // Stancl\Tenancy\Features\CrossDomainRedirect::class, // https://tenancy.samuelstancl.me/docs/v2/features/tenant-redirect/ ], diff --git a/src/TenancyServiceProvider.php b/src/TenancyServiceProvider.php index 20741d47..a51f6a98 100644 --- a/src/TenancyServiceProvider.php +++ b/src/TenancyServiceProvider.php @@ -87,6 +87,10 @@ class TenancyServiceProvider extends ServiceProvider __DIR__ . '/../assets/migrations/' => database_path('migrations'), ], 'migrations'); + $this->publishes([ + __DIR__ . '/../assets/2020_05_15_000010_create_tenant_user_impersonation_tokens_table.php' => database_path('migrations'), + ], 'impersonation-migrations'); + $this->publishes([ __DIR__ . '/../assets/TenancyServiceProvider.stub.php' => app_path('Providers/TenancyServiceProvider.php'), ], 'migrations'); diff --git a/tests/TenantUserImpersonationTest.php b/tests/TenantUserImpersonationTest.php index 941d4145..3d10f069 100644 --- a/tests/TenantUserImpersonationTest.php +++ b/tests/TenantUserImpersonationTest.php @@ -37,7 +37,7 @@ class TenantUserImpersonationTest extends TestCase parent::setUp(); $this->artisan('migrate', [ - '--path' => __DIR__ . '/../assets/2019_09_15_000020_create_tenant_user_impersonation_tokens_table.php', + '--path' => __DIR__ . '/../assets/2020_05_15_000010_create_tenant_user_impersonation_tokens_table.php', '--realpath' => true, ])->assertExitCode(0);