mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 17:14:03 +00:00
Remove conditional loading logic
Removed logic for conditionally registering the tenant:dump command based on the installed Laravel version
This commit is contained in:
parent
838a257fb3
commit
9597aca13a
2 changed files with 1 additions and 13 deletions
|
|
@ -88,13 +88,10 @@ class TenancyServiceProvider extends ServiceProvider
|
||||||
Commands\Install::class,
|
Commands\Install::class,
|
||||||
Commands\Migrate::class,
|
Commands\Migrate::class,
|
||||||
Commands\TenantList::class,
|
Commands\TenantList::class,
|
||||||
|
Commands\TenantDump::class,
|
||||||
Commands\MigrateFresh::class,
|
Commands\MigrateFresh::class,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ((int) Str::before($this->app->version(), '.') >= 8) {
|
|
||||||
$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');
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ use Illuminate\Support\Facades\Artisan;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Support\Str;
|
|
||||||
use Stancl\JobPipeline\JobPipeline;
|
use Stancl\JobPipeline\JobPipeline;
|
||||||
use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper;
|
use Stancl\Tenancy\Bootstrappers\DatabaseTenancyBootstrapper;
|
||||||
use Stancl\Tenancy\Events\TenancyEnded;
|
use Stancl\Tenancy\Events\TenancyEnded;
|
||||||
|
|
@ -95,10 +94,6 @@ class CommandsTest extends TestCase
|
||||||
/** @test */
|
/** @test */
|
||||||
public function migrate_command_loads_schema_state()
|
public function migrate_command_loads_schema_state()
|
||||||
{
|
{
|
||||||
if ((int) Str::before($this->app->version(), '.') < 8) {
|
|
||||||
$this->markTestSkipped("'Laravel version doesn't support schema dumps.'");
|
|
||||||
}
|
|
||||||
|
|
||||||
$tenant = Tenant::create();
|
$tenant = Tenant::create();
|
||||||
|
|
||||||
$this->assertFalse(Schema::hasTable('schema_users'));
|
$this->assertFalse(Schema::hasTable('schema_users'));
|
||||||
|
|
@ -119,10 +114,6 @@ class CommandsTest extends TestCase
|
||||||
/** @test */
|
/** @test */
|
||||||
public function dump_command_works()
|
public function dump_command_works()
|
||||||
{
|
{
|
||||||
if ((int) Str::before($this->app->version(), '.') < 9) {
|
|
||||||
$this->markTestSkipped("'Laravel version doesn't support schema dumps.'");
|
|
||||||
}
|
|
||||||
|
|
||||||
$tenant = Tenant::create();
|
$tenant = Tenant::create();
|
||||||
Artisan::call('tenants:migrate');
|
Artisan::call('tenants:migrate');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue