mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-16 22:07:09 +08:00
23 lines
462 B
TypeScript
23 lines
462 B
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
|
|
import { refreshPrompts } from './utils/prompts';
|
|
|
|
export class UpdatePrompts1715672224087 {
|
|
// do the migration
|
|
static async up(db: PrismaClient) {
|
|
await refreshPrompts(db);
|
|
}
|
|
|
|
// revert the migration
|
|
static async down(db: PrismaClient) {
|
|
await db.aiPrompt.updateMany({
|
|
where: {
|
|
model: 'gpt-4o',
|
|
},
|
|
data: {
|
|
model: 'gpt-4-vision-preview',
|
|
},
|
|
});
|
|
}
|
|
}
|