- Tambahkan kolom province, city, district, village, dan postal_code pada tabel customers. - Ganti nama kolom customer_no menjadi customer_code pada tabel accounts.
39 lines
1.1 KiB
PHP
39 lines
1.1 KiB
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('province')->nullable();
|
|
$table->string('city')->nullable();
|
|
$table->string('district')->nullable();
|
|
$table->string('village')->nullable();
|
|
$table->string('postal_code')->nullable();
|
|
$table->string('branch_code')->nullable();
|
|
$table->date('date_of_birth')->nullable();
|
|
$table->string('email')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('customers');
|
|
}
|
|
};
|