@@ -1,11 +1,14 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Contracts\Console\Kernel;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
require dirname(__DIR__).'/vendor/autoload.php';
|
||||
|
||||
$app = require dirname(__DIR__).'/bootstrap/app.php';
|
||||
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
|
||||
$app->make(Kernel::class)->bootstrap();
|
||||
|
||||
if (Illuminate\Support\Facades\DB::connection()->getDatabaseName() !== 'investemoz') {
|
||||
if (DB::connection()->getDatabaseName() !== 'investemoz') {
|
||||
fwrite(STDERR, "Refusing unexpected active database target.\n");
|
||||
exit(20);
|
||||
}
|
||||
@@ -29,7 +32,7 @@ fclose($pipes[2]);
|
||||
$exitCode = proc_close($process);
|
||||
|
||||
if ($exitCode !== 0) {
|
||||
fwrite(STDERR, "pg_dump failed: ".trim($stderr)."\n");
|
||||
fwrite(STDERR, 'pg_dump failed: '.trim($stderr)."\n");
|
||||
exit($exitCode);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user