feat(event): implement automatic tenant date text synchronization on save and delete; update related tests

This commit is contained in:
2026-08-11 09:49:59 -03:00
parent 19b506a465
commit 8d8e49fcfb
5 changed files with 55 additions and 5 deletions

View File

@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
DB::table('websites_extras')
->whereNull('is_enabled')
->update(['is_enabled' => true]);
Schema::table('websites_extras', function (Blueprint $table): void {
$table->boolean('is_enabled')->default(true)->nullable(false)->change();
});
}
public function down(): void
{
Schema::table('websites_extras', function (Blueprint $table): void {
$table->boolean('is_enabled')->nullable()->default(null)->change();
});
}
};