mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 00:34:44 +02:00
Whoops.... Fix env replacement...
Somehow this got copy pasta'd and yeh.... its not right...
This commit is contained in:
parent
dd7a01aa04
commit
c5824ff26c
@ -17,7 +17,8 @@ class EggParserService
|
|||||||
'server.build.default.port' => 'server.allocations.default.port',
|
'server.build.default.port' => 'server.allocations.default.port',
|
||||||
'server.build.env.SERVER_MEMORY' => 'server.build.memory_limit',
|
'server.build.env.SERVER_MEMORY' => 'server.build.memory_limit',
|
||||||
'server.build.memory' => 'server.build.memory_limit',
|
'server.build.memory' => 'server.build.memory_limit',
|
||||||
'server.build.env' => 'server.build.environment',
|
'server.build.env' => 'server.environment',
|
||||||
|
'server.build.environment' => 'server.environment',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
$eggs = DB::table('eggs')->get();
|
||||||
|
|
||||||
|
foreach ($eggs as $egg) {
|
||||||
|
$updatedEnv = str_replace(
|
||||||
|
'server.build.environment.',
|
||||||
|
'server.environment.',
|
||||||
|
$egg->config_files
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($updatedEnv !== $egg->config_files) {
|
||||||
|
$egg->config_files = $updatedEnv;
|
||||||
|
echo "Processed ENV update with ID: {$egg->name}\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
DB::table('eggs')
|
||||||
|
->where('id', $egg->id)
|
||||||
|
->update(['config_files' => $egg->config_files]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
// We shouldn't revert this...
|
||||||
|
}
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user