Files
Automata/packages/cli/src/databases/utils/commandHelpers.ts
कारतोफ्फेलस्क्रिप्ट™ 8e392cfc1d feat(core): Migrate to n8n's typeorm fork (#8590)
2024-02-08 15:13:29 +01:00

12 lines
510 B
TypeScript

import type { WorkflowEntity } from '@db/entities/WorkflowEntity';
import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
import { getMetadataArgsStorage } from '@n8n/typeorm';
export const disableAutoGeneratedIds = (
entityClass: typeof WorkflowEntity | typeof CredentialsEntity,
): void => {
const decoratorMetadata = getMetadataArgsStorage().generations;
const index = decoratorMetadata.findIndex((metadata) => metadata.target === entityClass);
decoratorMetadata.splice(index, 1);
};