Files
webstatement/database/migrations/2025_02_06_072406_create_customers_table.php
Daeng Deni Mardaeni 1b8c32a84d feat(customers): tambahkan model dan migrasi untuk tabel customers
- Menambahkan model Customer dengan relasi ke akun dan cabang.
- Membuat migrasi untuk tabel customers dengan kolom yang diperlukan.
2025-02-18 16:36:20 +07:00

34 lines
848 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('customers', function (Blueprint $table) {
$table->id();
$table->string('customer_code')->unique();
$table->string('name')->nullable();
$table->text('address')->nullable();
$table->string('branch_code')->nullable();
$table->string('date_of_birth')->nullable();
$table->string('email')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('customers');
}
};