This commit is contained in:
Simon Pocrnjič
2025-10-20 19:39:26 +02:00
parent 90bbf1942c
commit 872b76b012
9 changed files with 268 additions and 43 deletions
@@ -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::table('segments', function (Blueprint $table) {
if (! Schema::hasColumn('segments', 'exclude')) {
$table->boolean('exclude')->default(false)->after('active');
}
});
}
public function down(): void
{
Schema::table('segments', function (Blueprint $table) {
if (Schema::hasColumn('segments', 'exclude')) {
$table->dropColumn('exclude');
}
});
}
};