mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 12:24:04 +00:00
Re-create tmp dir as well if needed
This commit is contained in:
parent
c285f1faf4
commit
f7d0451545
4 changed files with 13 additions and 3 deletions
|
|
@ -23,8 +23,7 @@ class Migrate extends MigrateCommand
|
|||
{
|
||||
parent::__construct($migrator, $dispatcher);
|
||||
|
||||
// Add the --tenants option
|
||||
$this->specifyParameters();
|
||||
$this->specifyTenantSignature();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class Rollback extends RollbackCommand
|
|||
{
|
||||
parent::__construct($migrator);
|
||||
|
||||
$this->specifyParameters();
|
||||
$this->specifyTenantSignature();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,12 @@ namespace Stancl\Tenancy\Concerns;
|
|||
|
||||
trait ExtendsLaravelCommand
|
||||
{
|
||||
protected function specifyTenantSignature(): void
|
||||
{
|
||||
$this->setName('tenants:migrate');
|
||||
$this->specifyParameters();
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return static::getDefaultName();
|
||||
|
|
|
|||
|
|
@ -67,6 +67,11 @@ class QueueTest extends TestCase
|
|||
$valueStorePath = __DIR__ . '/Etc/tmp/queuetest.json';
|
||||
|
||||
if (! file_exists($valueStorePath)) {
|
||||
// The directory sometimes goes missing as well when the file is deleted in git
|
||||
if (! is_dir(__DIR__ . '/Etc/tmp')) {
|
||||
mkdir(__DIR__ . '/Etc/tmp');
|
||||
}
|
||||
|
||||
file_put_contents($valueStorePath, '');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue