tabelle ai_model_api_provider entfernt
This commit is contained in:
@@ -91,11 +91,6 @@ return new class extends Migration
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('ai_model_api_provider', function (Blueprint $table) {
|
||||
$table->foreignId('ai_model_id')->constrained()->onDelete('cascade');
|
||||
$table->foreignId('api_provider_id')->constrained()->onDelete('cascade');
|
||||
$table->primary(['ai_model_id', 'api_provider_id']);
|
||||
});
|
||||
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
@@ -133,7 +128,6 @@ return new class extends Migration
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
Schema::dropIfExists('ai_model_api_provider');
|
||||
Schema::dropIfExists('settings');
|
||||
Schema::dropIfExists('images');
|
||||
Schema::dropIfExists('styles');
|
||||
|
||||
@@ -23,8 +23,9 @@ class AiModelApiProviderSeeder extends Seeder
|
||||
]
|
||||
];
|
||||
|
||||
// Update existing AI models with their API provider IDs
|
||||
foreach ($data as $row) {
|
||||
DB::table('ai_model_api_provider')->insert($row);
|
||||
\App\Models\AiModel::where('id', $row['ai_model_id'])->update(['api_provider_id' => $row['api_provider_id']]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user