fix:이력 테이블 외래키 이름 길이 초과 수정
- MySQL 64자 제한으로 자동생성 외래키명 실패 - foreignId()->constrained() → 수동 foreign() + 짧은 이름(bb_amount_log_trans_fk) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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('변경 전 부가세');
|
||||
|
||||
Reference in New Issue
Block a user