feat:credit_inquiries 테이블에 tenant_id 컬럼 추가
- 신용평가 조회회수 집계 기능을 위한 테넌트 구분 컬럼 - tenant_id, (tenant_id, inquired_at) 인덱스 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('credit_inquiries', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('tenant_id')->nullable()->after('id');
|
||||
$table->index('tenant_id');
|
||||
$table->index(['tenant_id', 'inquired_at']);
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('credit_inquiries', function (Blueprint $table) {
|
||||
$table->dropIndex(['tenant_id', 'inquired_at']);
|
||||
$table->dropIndex(['tenant_id']);
|
||||
$table->dropColumn('tenant_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user