Update bunines bugs
Some checks failed
Build, Push and Deploy / build-and-push (push) Failing after 2m57s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 16s
Build, Push and Deploy / deploy-staging (push) Has been skipped
Build, Push and Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-18 15:50:39 +07:00
parent e2fa4d2d7b
commit 62417c44be
2 changed files with 47 additions and 19 deletions

View File

@@ -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();
}
/**