UpdateServerless migration fix 2 (#12755)

closes
https://github.com/twentyhq/twenty/issues/12651#issuecomment-2990255291
This commit is contained in:
Paul Rastoin
2025-06-20 11:35:27 +02:00
committed by GitHub
parent 901cc1feb8
commit fe5574fdf6

View File

@ -24,7 +24,7 @@ export class RemoveUselessServerlessFunctionColumn1748942397538
for (const typeName of potentialTypeNameToMigrate) {
const selectResult = await queryRunner.query(
`SELECT 1 FROM information_schema.types WHERE type_schema = 'metadata' AND type_name = '${typeName}';`,
`SELECT true FROM pg_type WHERE typname = '${typeName}' AND typnamespace = 'metadata'::regnamespace`,
);
const typeNameExists = selectResult && selectResult.length > 0;