From 98ab3dac9a8dbc390f1f574461b407e2ebbf156e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Thu, 5 Feb 2026 10:49:53 +0900 Subject: [PATCH] =?UTF-8?q?fix:=EC=9D=B4=EB=A0=A5=20=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=B8=94=20=EC=99=B8=EB=9E=98=ED=82=A4=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EA=B8=B8=EC=9D=B4=20=EC=B4=88=EA=B3=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - MySQL 64자 제한으로 자동생성 외래키명 실패 - foreignId()->constrained() → 수동 foreign() + 짧은 이름(bb_amount_log_trans_fk) Co-Authored-By: Claude Opus 4.5 --- ...00_create_barobill_card_transaction_amount_logs_table.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/database/migrations/2026_02_05_200100_create_barobill_card_transaction_amount_logs_table.php b/database/migrations/2026_02_05_200100_create_barobill_card_transaction_amount_logs_table.php index f5b05b7..5f3f710 100644 --- a/database/migrations/2026_02_05_200100_create_barobill_card_transaction_amount_logs_table.php +++ b/database/migrations/2026_02_05_200100_create_barobill_card_transaction_amount_logs_table.php @@ -13,8 +13,9 @@ public function up(): void { Schema::create('barobill_card_transaction_amount_logs', function (Blueprint $table) { $table->id(); - $table->foreignId('card_transaction_id')->constrained('barobill_card_transactions')->onDelete('cascade') - ->comment('카드 거래 ID'); + $table->unsignedBigInteger('card_transaction_id')->comment('카드 거래 ID'); + $table->foreign('card_transaction_id', 'bb_amount_log_trans_fk') + ->references('id')->on('barobill_card_transactions')->onDelete('cascade'); $table->string('original_unique_key', 255)->comment('거래 고유키 (cardNum|useDt|approvalNum|amount)'); $table->decimal('before_supply_amount', 18, 2)->comment('변경 전 공급가액'); $table->decimal('before_tax', 18, 2)->comment('변경 전 부가세');