feat:ai_configs 테이블 마이그레이션 추가
- AI API 설정 테이블 (Gemini, Claude, OpenAI 지원) - provider별 활성화 상태 관리 - 명함 OCR 시스템을 위한 기반 구조
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?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::create('ai_configs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name', 50)->comment('설정 이름 (Gemini, Claude 등)');
|
||||
$table->string('provider', 30)->comment('제공자 (gemini, claude, openai)');
|
||||
$table->string('api_key', 255)->comment('API 키');
|
||||
$table->string('model', 100)->comment('모델명 (gemini-2.0-flash 등)');
|
||||
$table->string('base_url', 255)->nullable()->comment('API Base URL');
|
||||
$table->text('description')->nullable()->comment('설명');
|
||||
$table->boolean('is_active')->default(false)->comment('활성화 여부 (provider당 1개만 활성화)');
|
||||
$table->json('options')->nullable()->comment('추가 옵션 (JSON)');
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
|
||||
$table->index('provider');
|
||||
$table->index(['provider', 'is_active']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('ai_configs');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user