<?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('notification_delivery_attempts',function(Blueprint $t){$t->id();$t->foreignId('business_id')->index();$t->foreignId('user_id')->index();$t->uuid('notification_id')->nullable()->index();$t->string('event')->index();$t->string('channel');$t->string('status')->default('pending')->index();$t->unsignedInteger('attempt')->default(1);$t->json('payload');$t->text('error')->nullable();$t->dateTime('attempted_at');$t->dateTime('succeeded_at')->nullable();$t->timestamps();});}
 public function down():void{Schema::dropIfExists('notification_delivery_attempts');}
};
