feat: API 폐기 후보 관리 테이블 마이그레이션 추가

- admin_api_deprecations 테이블 생성
- 상태: candidate, scheduled, deprecated, removed
This commit is contained in:
2025-12-18 20:26:23 +09:00
parent 45780ea351
commit 7e4b6a08d8

View File

@@ -0,0 +1,33 @@
<?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::create('admin_api_deprecations', function (Blueprint $table) {
$table->id();
$table->string('endpoint', 500)->comment('API 엔드포인트');
$table->string('method', 10)->comment('HTTP 메서드');
$table->enum('status', ['candidate', 'scheduled', 'deprecated', 'removed'])
->default('candidate')
->comment('상태: 후보, 예정, 폐기됨, 삭제됨');
$table->text('reason')->nullable()->comment('폐기 사유');
$table->date('scheduled_date')->nullable()->comment('폐기 예정일');
$table->date('deprecated_date')->nullable()->comment('실제 폐기일');
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
$table->timestamps();
$table->unique(['endpoint', 'method']);
$table->index('status');
});
}
public function down(): void
{
Schema::dropIfExists('admin_api_deprecations');
}
};