topnotch_website/database/migrations/018_create_payments_table.php

37 lines
896 B
PHP
Raw Normal View History

2025-01-24 21:37:05 -05:00
<?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();
2025-02-18 20:13:54 -05:00
$table->text('check_number')->nullable();
$table->date('date')->default(today());
2025-01-24 21:37:05 -05:00
$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');
}
};