diff --git a/database/migrations/2026_01_27_100000_create_ai_configs_table.php b/database/migrations/2026_01_27_100000_create_ai_configs_table.php new file mode 100644 index 0000000..e4ddce6 --- /dev/null +++ b/database/migrations/2026_01_27_100000_create_ai_configs_table.php @@ -0,0 +1,39 @@ +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'); + } +};