Plugins base (#613)

* wip

* wip

* cleanup

* notification channels

* phpstan

* services

* remove server types

* refactoring

* refactoring
This commit is contained in:
Saeed Vaziry
2025-06-14 14:35:18 +02:00
committed by GitHub
parent adc0653d15
commit 131b828807
311 changed files with 3976 additions and 2660 deletions

View File

@ -1,19 +1,20 @@
<?php
use App\Enums\StorageProvider;
use App\Models\StorageProvider;
use App\StorageProviders\S3;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
public function up(): void
{
$wasabiProviders = \App\Models\StorageProvider::query()
$wasabiProviders = StorageProvider::query()
->where('provider', 'wasabi')
->get();
/** @var \App\Models\StorageProvider $provider */
/** @var StorageProvider $provider */
foreach ($wasabiProviders as $provider) {
$provider->provider = StorageProvider::S3;
$provider->provider = S3::id();
$credentials = $provider->credentials;
$credentials['api_url'] = "https://{$credentials['bucket']}.s3.{$credentials['region']}.wasabisys.com";
$provider->credentials = $credentials;

View File

@ -0,0 +1,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('servers', function (Blueprint $table) {
$table->dropColumn('type');
$table->dropColumn('type_data');
});
}
public function down(): void
{
Schema::table('servers', function (Blueprint $table) {
//
});
}
};

View File

@ -0,0 +1,22 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('workers', function (Blueprint $table) {
$table->string('name')->nullable()->index();
});
}
public function down(): void
{
Schema::table('workers', function (Blueprint $table) {
$table->dropColumn('name');
});
}
};