From 583bf686bf66ab65c7dadee6c7905088362f84f0 Mon Sep 17 00:00:00 2001 From: Lars Gullestrup Date: Mon, 18 May 2026 22:35:22 +0200 Subject: [PATCH 1/4] fetch latest SDE Version --- src/database/seeders/CcpSdeSeeder.php | 30 +++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/database/seeders/CcpSdeSeeder.php b/src/database/seeders/CcpSdeSeeder.php index 11f57c5e..c5f3047c 100644 --- a/src/database/seeders/CcpSdeSeeder.php +++ b/src/database/seeders/CcpSdeSeeder.php @@ -48,7 +48,7 @@ class CcpSdeSeeder extends Seeder /** * @var string */ - private const VERSION = '3118350'; + private $version = '3118350'; /** * The SDE file storage path. @@ -86,8 +86,10 @@ public function run() if (! $this->isStorageOk()) throw new DirectoryNotFoundException('Storage path is not OK. Please check permissions.'); - $this->command->info('Authorised Version Found as: ' . self::VERSION); + $this->command->info('Getting latest SDE Version'); + $this->getLatestSdeVersion(); + $this->command->info('Authorised Version Found as: ' . $this->version); $this->command->info('Downloading static files...'); $this->downloadStaticFiles(); @@ -96,14 +98,17 @@ public function run() $this->call($this->seeders); } + /** + * Download the EVE Sde from Fuzzwork and save it + * in the storage_path/sde folder. + */ /** * Download the EVE Sde from Fuzzwork and save it * in the storage_path/sde folder. */ private function downloadStaticFiles() { - - $sde = sprintf('eve-online-static-data-%d-jsonl.zip', self::VERSION); + $sde = sprintf('eve-online-static-data-%d-jsonl.zip', $this->version); $url = sprintf('https://developers.eveonline.com/static-data/tranquility/%s', $sde); $destination = $this->storage_path . $sde; @@ -122,6 +127,23 @@ private function downloadStaticFiles() } } + private function getLatestSdeVersion() + { + $destination = $this->storage_path.'latest.jsonl'; + $result = Http::get('https://developers.eveonline.com/static-data/tranquility/latest.jsonl'); + // fallback to const version + if(!$result->successful()){ + $this->command->info('Unable to get latest version, using version: '. $this->version); + } + $firstLine = strtok($result->body(), "\n"); + $data = json_decode($firstLine, true); + if(!$data['buildNumber']){ + this->command->info('Unable to get latest build version from response. using version: '. $this->version); + } + + $this->version = $data['buildNumber']; + } + private function extractZipWithProgress(string $zipPath, string $destination): void { $zip = new \ZipArchive; From f8f31497ffd127ef4c96ebb68d7854b63aab110d Mon Sep 17 00:00:00 2001 From: Lars Gullestrup Date: Mon, 18 May 2026 22:35:40 +0200 Subject: [PATCH 2/4] increase invType typename length --- src/database/seeders/Sde/Ccp/InvTypesSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/seeders/Sde/Ccp/InvTypesSeeder.php b/src/database/seeders/Sde/Ccp/InvTypesSeeder.php index ab8b6a64..faa9d004 100644 --- a/src/database/seeders/Sde/Ccp/InvTypesSeeder.php +++ b/src/database/seeders/Sde/Ccp/InvTypesSeeder.php @@ -43,7 +43,7 @@ protected function getSdeTableDefinition(Blueprint $table): void { $table->integer('typeID')->primary(); $table->integer('groupID'); - $table->string('typeName', 100); + $table->string('typeName', 150); $table->text('description')->nullable(); $table->double('mass')->nullable(); $table->double('volume')->nullable(); From 1e84ff2fe52f0076d8eb8a9e3dd5a70262952816 Mon Sep 17 00:00:00 2001 From: Lars Gullestrup Date: Mon, 18 May 2026 22:44:43 +0200 Subject: [PATCH 3/4] early exit's --- src/database/seeders/CcpSdeSeeder.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/database/seeders/CcpSdeSeeder.php b/src/database/seeders/CcpSdeSeeder.php index c5f3047c..b2b89161 100644 --- a/src/database/seeders/CcpSdeSeeder.php +++ b/src/database/seeders/CcpSdeSeeder.php @@ -134,11 +134,13 @@ private function getLatestSdeVersion() // fallback to const version if(!$result->successful()){ $this->command->info('Unable to get latest version, using version: '. $this->version); + return; } $firstLine = strtok($result->body(), "\n"); $data = json_decode($firstLine, true); if(!$data['buildNumber']){ this->command->info('Unable to get latest build version from response. using version: '. $this->version); + return; } $this->version = $data['buildNumber']; From e698a14892d529fb253740bd32a436a3540a3505 Mon Sep 17 00:00:00 2001 From: Lars Gullestrup Date: Tue, 19 May 2026 08:03:01 +0200 Subject: [PATCH 4/4] removed duplicate comment and unused variable. --- src/database/seeders/CcpSdeSeeder.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/database/seeders/CcpSdeSeeder.php b/src/database/seeders/CcpSdeSeeder.php index b2b89161..0d991967 100644 --- a/src/database/seeders/CcpSdeSeeder.php +++ b/src/database/seeders/CcpSdeSeeder.php @@ -98,10 +98,7 @@ public function run() $this->call($this->seeders); } - /** - * Download the EVE Sde from Fuzzwork and save it - * in the storage_path/sde folder. - */ + /** * Download the EVE Sde from Fuzzwork and save it * in the storage_path/sde folder. @@ -129,7 +126,6 @@ private function downloadStaticFiles() private function getLatestSdeVersion() { - $destination = $this->storage_path.'latest.jsonl'; $result = Http::get('https://developers.eveonline.com/static-data/tranquility/latest.jsonl'); // fallback to const version if(!$result->successful()){