mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
Plugins base (#613)
* wip * wip * cleanup * notification channels * phpstan * services * remove server types * refactoring * refactoring
This commit is contained in:
@ -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;
|
||||
|
@ -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) {
|
||||
//
|
||||
});
|
||||
}
|
||||
};
|
@ -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');
|
||||
});
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user