mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 17:04:03 +00:00
Move DatabaseManager
This commit is contained in:
parent
16a598bb17
commit
579779b88b
9 changed files with 13 additions and 27 deletions
|
|
@ -4,12 +4,10 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Database\Console\Migrations\MigrateCommand;
|
||||
use Illuminate\Database\Migrations\Migrator;
|
||||
use Stancl\Tenancy\Concerns\DealsWithMigrations;
|
||||
use Stancl\Tenancy\Concerns\HasATenantsOption;
|
||||
use Stancl\Tenancy\DatabaseManager;
|
||||
use Stancl\Tenancy\Events\DatabaseMigrated;
|
||||
use Stancl\Tenancy\Events\MigratingDatabase;
|
||||
|
||||
|
|
@ -17,8 +15,6 @@ class Migrate extends MigrateCommand
|
|||
{
|
||||
use HasATenantsOption, DealsWithMigrations;
|
||||
|
||||
protected $database;
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
|
|
@ -31,10 +27,9 @@ class Migrate extends MigrateCommand
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Migrator $migrator, DatabaseManager $database)
|
||||
public function __construct(Migrator $migrator)
|
||||
{
|
||||
parent::__construct($migrator);
|
||||
$this->database = $database;
|
||||
|
||||
$this->setName('tenants:migrate');
|
||||
$this->specifyParameters();
|
||||
|
|
|
|||
|
|
@ -4,12 +4,10 @@ declare(strict_types=1);
|
|||
|
||||
namespace Stancl\Tenancy\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Database\Console\Migrations\RollbackCommand;
|
||||
use Illuminate\Database\Migrations\Migrator;
|
||||
use Stancl\Tenancy\Concerns\DealsWithMigrations;
|
||||
use Stancl\Tenancy\Concerns\HasATenantsOption;
|
||||
use Stancl\Tenancy\DatabaseManager;
|
||||
use Stancl\Tenancy\Events\DatabaseRolledBack;
|
||||
use Stancl\Tenancy\Events\RollingBackDatabase;
|
||||
|
||||
|
|
@ -17,8 +15,6 @@ class Rollback extends RollbackCommand
|
|||
{
|
||||
use HasATenantsOption, DealsWithMigrations;
|
||||
|
||||
protected $database;
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
|
|
@ -31,10 +27,9 @@ class Rollback extends RollbackCommand
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Migrator $migrator, DatabaseManager $database)
|
||||
public function __construct(Migrator $migrator)
|
||||
{
|
||||
parent::__construct($migrator);
|
||||
$this->database = $database;
|
||||
|
||||
$this->setName('tenants:rollback');
|
||||
$this->specifyParameters();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ namespace Stancl\Tenancy\Commands;
|
|||
use Illuminate\Database\ConnectionResolverInterface;
|
||||
use Illuminate\Database\Console\Seeds\SeedCommand;
|
||||
use Stancl\Tenancy\Concerns\HasATenantsOption;
|
||||
use Stancl\Tenancy\DatabaseManager;
|
||||
use Stancl\Tenancy\Events\DatabaseSeeded;
|
||||
use Stancl\Tenancy\Events\SeedingDatabase;
|
||||
|
||||
|
|
@ -15,8 +14,6 @@ class Seed extends SeedCommand
|
|||
{
|
||||
use HasATenantsOption;
|
||||
|
||||
protected $database;
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
|
|
@ -29,10 +26,9 @@ class Seed extends SeedCommand
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(ConnectionResolverInterface $resolver, DatabaseManager $database)
|
||||
public function __construct(ConnectionResolverInterface $resolver)
|
||||
{
|
||||
parent::__construct($resolver);
|
||||
$this->database = $database;
|
||||
|
||||
$this->setName('tenants:seed');
|
||||
$this->specifyParameters();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue