feat(api): archived_records 테이블에 batch 필드 추가
- batch_id (uuid): 일괄 삭제 작업 그룹 식별자 - batch_description (string): 작업 설명 (예: 테넌트 ABC 삭제) - batch_id 인덱스 추가
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?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::table('archived_records', function (Blueprint $table) {
|
||||
$table->uuid('batch_id')->nullable()->after('id')->comment('일괄 작업 ID');
|
||||
$table->string('batch_description')->nullable()->after('batch_id')->comment('작업 요약 (예: 테넌트 ABC 삭제)');
|
||||
|
||||
$table->index('batch_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('archived_records', function (Blueprint $table) {
|
||||
$table->dropIndex(['batch_id']);
|
||||
$table->dropColumn(['batch_id', 'batch_description']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user