mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-17 22:37:04 +08:00
19 lines
425 B
TypeScript
19 lines
425 B
TypeScript
import { PrismaClient, WorkspaceMemberStatus } from '@prisma/client';
|
|
|
|
export class MigrateInviteStatus1732861452428 {
|
|
// do the migration
|
|
static async up(db: PrismaClient) {
|
|
await db.workspaceUserRole.updateMany({
|
|
where: {
|
|
accepted: true,
|
|
},
|
|
data: {
|
|
status: WorkspaceMemberStatus.Accepted,
|
|
},
|
|
});
|
|
}
|
|
|
|
// revert the migration
|
|
static async down(_db: PrismaClient) {}
|
|
}
|