diff --git a/database/migrations/2026_02_06_095159_create_barobill_bank_transaction_overrides_table.php b/database/migrations/2026_02_06_095159_create_barobill_bank_transaction_overrides_table.php new file mode 100644 index 0000000..ec43c8e --- /dev/null +++ b/database/migrations/2026_02_06_095159_create_barobill_bank_transaction_overrides_table.php @@ -0,0 +1,37 @@ +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'); + } +};