diff --git a/packages/db/prisma/data-migrations/2023-09-11_migrate-alert-messages/index.ts b/packages/db/prisma/data-migrations/2023-09-11_migrate-alert-messages/index.ts index 8bbb800515..53f344ca9c 100644 --- a/packages/db/prisma/data-migrations/2023-09-11_migrate-alert-messages/index.ts +++ b/packages/db/prisma/data-migrations/2023-09-11_migrate-alert-messages/index.ts @@ -76,25 +76,28 @@ export const job20230911_migrate_alert_messages = { // fs.writeFileSync(path.resolve(__dirname, '___translations.json'), JSON.stringify(translation)) - await prisma.$transaction(async (tx) => { - const tkeys = await tx.translationKey.createMany({ data: translationKey, skipDuplicates: true }) - log(`Translation keys created: ${tkeys.count}`) - - const fText = await tx.freeText.createMany({ data: freeText, skipDuplicates: true }) - log(`FreeText records created: ${fText.count}`) - - const oAtt = await tx.organizationAttribute.createMany({ - data: organizationAttribute, - skipDuplicates: true, - }) - log(`Organization Attribute records created: ${oAtt.count}`) - - const aSupp = await tx.attributeSupplement.createMany({ - data: attributeSupplement, - skipDuplicates: true, - }) - log(`Attribute Supplement records created: ${aSupp.count}`) - }) + await prisma.$transaction( + async (tx) => { + const tkeys = await tx.translationKey.createMany({ data: translationKey, skipDuplicates: true }) + log(`Translation keys created: ${tkeys.count}`) + + const fText = await tx.freeText.createMany({ data: freeText, skipDuplicates: true }) + log(`FreeText records created: ${fText.count}`) + + const oAtt = await tx.organizationAttribute.createMany({ + data: organizationAttribute, + skipDuplicates: true, + }) + log(`Organization Attribute records created: ${oAtt.count}`) + + const aSupp = await tx.attributeSupplement.createMany({ + data: attributeSupplement, + skipDuplicates: true, + }) + log(`Attribute Supplement records created: ${aSupp.count}`) + }, + { timeout: 60000 } + ) /** * DO NOT REMOVE BELOW