Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

change timeout

Roman Pominov99df39cbb189
diff --git a/packages/prisma-client/prisma/migrations/20220912142938_assets-meta-data/migration.ts b/packages/prisma-client/prisma/migrations/20220912142938_assets-meta-data/migration.ts
index 6cf76425ce..0652f5fe03 100644
--- a/packages/prisma-client/prisma/migrations/20220912142938_assets-meta-data/migration.ts
+++ b/packages/prisma-client/prisma/migrations/20220912142938_assets-meta-data/migration.ts
@@ -12,22 +12,25 @@ import { PrismaClient } from "./client";
export default () => {
const client = new PrismaClient();
- return client.$transaction(async (prisma) => {
- const previousAssets = await prisma.asset.findMany();
- const update = previousAssets.map((asset) => {
- return {
- id: asset.id,
- description: asset.alt,
- meta: JSON.stringify({
- width: Number(asset.width),
- height: Number(asset.height),
- }),
- };
- });
- await Promise.all(
- update.map(({ id, ...data }) =>
- prisma.asset.update({ where: { id }, data })
- )
- );
- });
+ return client.$transaction(
+ async (prisma) => {
+ const previousAssets = await prisma.asset.findMany();
+ const update = previousAssets.map((asset) => {
+ return {
+ id: asset.id,
+ description: asset.alt,
+ meta: JSON.stringify({
+ width: Number(asset.width),
+ height: Number(asset.height),
+ }),
+ };
+ });
+ await Promise.all(
+ update.map(({ id, ...data }) =>
+ prisma.asset.update({ where: { id }, data })
+ )
+ );
+ },
+ { timeout: 1000 * 60 * 5 }
+ );
};