feat:바로빌 계좌 거래내역 오버라이드 테이블 마이그레이션 추가
- barobill_bank_transaction_overrides 테이블 생성 - tenant_id + unique_key 복합 유니크 인덱스 - modified_summary, modified_cast 필드로 수정값 저장 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<?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('barobill_bank_transaction_overrides', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('tenant_id')->comment('테넌트 ID');
|
||||
$table->string('unique_key', 100)->comment('거래 고유키 (계좌번호|거래일시|입금|출금|잔액)');
|
||||
$table->string('modified_summary', 200)->nullable()->comment('수정된 적요');
|
||||
$table->string('modified_cast', 200)->nullable()->comment('수정된 내용');
|
||||
$table->timestamps();
|
||||
|
||||
// 복합 유니크 인덱스 (테넌트별 거래 고유키)
|
||||
$table->unique(['tenant_id', 'unique_key'], 'bb_trans_override_unique');
|
||||
|
||||
// 조회용 인덱스
|
||||
$table->index('tenant_id', 'bb_trans_override_tenant_idx');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('barobill_bank_transaction_overrides');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user