Files
project/database/migrations/2024_11_25_164059_create_payments_table.php
2025-01-16 15:34:10 +01:00

34 lines
750 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('payments', function (Blueprint $table) {
$table->id();
$table->foreignId('invoice_id')->constrained();
$table->decimal('paid_amount', 15, 2);
$table->string('status');
$table->string('payment_method')->nullable();
$table->date('payment_date');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('payments');
}
};