1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 17:14:03 +00:00

Revert "register dumcommand when L8"

This reverts commit f165fc58ba.
This commit is contained in:
Abrar Ahmad 2022-08-22 13:53:44 +05:00
parent 3ddb68e900
commit 2d2d3b88b0
2 changed files with 1 additions and 21 deletions

View file

@ -84,16 +84,10 @@ class TenancyServiceProvider extends ServiceProvider
Commands\Migrate::class, Commands\Migrate::class,
Commands\Rollback::class, Commands\Rollback::class,
Commands\TenantList::class, Commands\TenantList::class,
Commands\TenantDump::class,
Commands\MigrateFresh::class, Commands\MigrateFresh::class,
]); ]);
if (version_compare(app()->version(), '8.0', '>=')) {
// DumpCommand only exists since Laravel 8.0 or above
$this->commands([
Commands\TenantDump::class,
]);
}
$this->publishes([ $this->publishes([
__DIR__ . '/../assets/config.php' => config_path('tenancy.php'), __DIR__ . '/../assets/config.php' => config_path('tenancy.php'),
], 'config'); ], 'config');

View file

@ -76,11 +76,6 @@ test('migrate command works with tenants option', function () {
}); });
test('migrate command loads schema state', function () { test('migrate command loads schema state', function () {
if (! isVersion8()) {
$this->markTestSkipped('DumpCommand only exists since Laravel 8.0 or above');
}
$tenant = Tenant::create(); $tenant = Tenant::create();
expect(Schema::hasTable('schema_users'))->toBeFalse(); expect(Schema::hasTable('schema_users'))->toBeFalse();
@ -99,10 +94,6 @@ test('migrate command loads schema state', function () {
}); });
test('dump command works', function () { test('dump command works', function () {
if (! isVersion8()) {
$this->markTestSkipped('DumpCommand only exists since Laravel 8.0 or above');
}
$tenant = Tenant::create(); $tenant = Tenant::create();
Artisan::call('tenants:migrate'); Artisan::call('tenants:migrate');
@ -219,8 +210,3 @@ function databaseConnectionSwitchedToDefault()
expect(DB::connection()->getDatabaseName())->toBe($originalDBName); expect(DB::connection()->getDatabaseName())->toBe($originalDBName);
} }
function isVersion8(): bool
{
return version_compare(app()->version(), '8.0', '>=');
}