topnotch_website/database/migrations/018_create_payments_table.php
2025-02-19 23:02:44 -05:00

37 lines
896 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('customer_id')->constrained();
$table->text('check_number')->nullable();
$table->date('date')->default(today());
$table->decimal('amount', 8, 2);
$table->decimal('unapplied_amount', 8, 2)->nullable();
$table->text('notes')->nullable();
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('payments');
}
};