mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-12 15:53:46 -04:00
Merge remote-tracking branch 'origin/main' into next
This commit is contained in:
@@ -121,11 +121,6 @@ return new class extends Migration
|
||||
$table->date('image_candidate_scans_date')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('instance_settings', function (Blueprint $table) {
|
||||
$table->boolean('is_image_scanning_allowed')->default(true);
|
||||
$table->string('image_scan_db_url')->nullable();
|
||||
});
|
||||
|
||||
Schema::table('teams', function (Blueprint $table) {
|
||||
$table->boolean('scan_images_on_new_servers')->default(false);
|
||||
});
|
||||
@@ -185,10 +180,6 @@ return new class extends Migration
|
||||
$table->dropColumn('scan_images_on_new_servers');
|
||||
});
|
||||
|
||||
Schema::table('instance_settings', function (Blueprint $table) {
|
||||
$table->dropColumn(['is_image_scanning_allowed', 'image_scan_db_url']);
|
||||
});
|
||||
|
||||
Schema::table('server_settings', function (Blueprint $table) {
|
||||
$table->dropColumn(['is_image_scan_enabled', 'image_candidate_scans_today', 'image_candidate_scans_date']);
|
||||
});
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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::create('stars', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
||||
$table->morphs('starrable');
|
||||
$table->unsignedInteger('position')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
$table->unique(['user_id', 'starrable_type', 'starrable_id']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('stars');
|
||||
}
|
||||
};
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Image scanning has no instance switch and no vulnerability database mirror. Instances that ran the image
|
||||
* scanning migration before they were removed still have the columns.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
foreach (['is_image_scanning_allowed', 'image_scan_db_url'] as $column) {
|
||||
if (Schema::hasColumn('instance_settings', $column)) {
|
||||
Schema::table('instance_settings', function (Blueprint $table) use ($column) {
|
||||
$table->dropColumn($column);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user