Update Spatie versi 4

This commit is contained in:
2026-11-05 17:06:11 +07:00
parent b76fa9e59b
commit 9cdd178297
11 changed files with 167 additions and 69 deletions
@@ -2,6 +2,7 @@
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
@@ -15,11 +16,19 @@ return new class extends Migration
$table->nullableMorphs('subject', 'subject');
$table->string('event')->nullable();
$table->nullableMorphs('causer', 'causer');
$table->json('attribute_changes')->nullable();
$table->json('properties')->nullable();
$table->uuid('batch_uuid')->nullable();
$table->timestamps();
$table->index('created_at');
});
// Index pencarian log per petani
DB::statement("create index activity_log_petani_id_index on activity_log (((properties->>'petani_id')::bigint))");
}
public function down(): void
{
Schema::dropIfExists('activity_log');
}
};