Update bunines bugs
Some checks failed
Some checks failed
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\File;
|
||||
@@ -27,7 +28,7 @@ public function run(): void
|
||||
if (DB::getDriverName() === 'pgsql') {
|
||||
DB::statement("SET session_replication_role = 'replica';");
|
||||
} else {
|
||||
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
|
||||
Schema::disableForeignKeyConstraints();
|
||||
}
|
||||
|
||||
$handle = fopen($sqlPath, "r");
|
||||
@@ -88,9 +89,8 @@ public function run(): void
|
||||
DB::statement("SET session_replication_role = 'origin';");
|
||||
// Update sequences for PostgreSQL
|
||||
$this->updatePostgresSequences();
|
||||
} else {
|
||||
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
|
||||
}
|
||||
Schema::enableForeignKeyConstraints();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user