mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
minor fixes for migrations
This commit is contained in:
parent
22e739ca26
commit
9372a304c7
@ -7,6 +7,7 @@ use App\Models\User;
|
||||
use App\Traits\GenerateMigrationResources;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class ExportMigrations extends Command
|
||||
{
|
||||
@ -63,12 +64,12 @@ class ExportMigrations extends Command
|
||||
|
||||
|
||||
if($this->option('email')) {
|
||||
$record = User::on(DB_NINJA_1)->where('email', $this->option('user'))->first();
|
||||
$record = User::on(DB_NINJA_1)->where('email', $this->option('email'))->first();
|
||||
|
||||
if($record)
|
||||
return $this->export($record);
|
||||
|
||||
$record = User::on(DB_NINJA_2)->where('email', $this->option('user'))->first();
|
||||
$record = User::on(DB_NINJA_2)->where('email', $this->option('email'))->first();
|
||||
|
||||
if($record)
|
||||
return $this->export($record);
|
||||
@ -132,6 +133,7 @@ class ExportMigrations extends Command
|
||||
'ninja_tokens' => $this->getNinjaToken(),
|
||||
];
|
||||
|
||||
Storage::makeDirectory('migrations');
|
||||
$file = storage_path("migrations/{$fileName}.zip");
|
||||
|
||||
$zip = new \ZipArchive();
|
||||
|
Loading…
Reference in New Issue
Block a user