Files
webstatement/database/migrations/2025_02_06_095447_create_accounts_table.php
Daeng Deni Mardaeni d8740ea8f5 feat(accounts): tambahkan model dan migrasi untuk tabel akun
- Menambahkan model Account dengan atribut yang dapat diisi.
- Menambahkan migrasi untuk membuat tabel accounts dengan kolom yang diperlukan.
2025-02-18 16:36:20 +07:00

34 lines
869 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('accounts', function (Blueprint $table) {
$table->id();
$table->string('account_number')->unique();
$table->string('customer_code')->nullable();
$table->string('currency')->nullable();
$table->string('opening_date')->nullable();
$table->string('branch_code')->nullable();
$table->string('product_category')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('accounts');
}
};