id(); $table->foreignId('account_id')->constrained()->cascadeOnDelete(); $table->bigInteger('amount_cents'); $table->string('currency', 3)->default('EUR'); $table->string('reference')->nullable(); $table->timestamp('paid_at')->nullable(); $table->jsonb('meta')->nullable(); $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete(); $table->timestamps(); $table->softDeletes(); $table->index(['account_id', 'paid_at']); $table->index('reference'); }); } } public function down(): void { Schema::dropIfExists('payments'); } };