fix(Postgres Node): RMC do not mark collumn as required if identity_generation is BY DEFAULT (#13752)

Co-authored-by: Dana <152518854+dana-gill@users.noreply.github.com>
This commit is contained in:
Michael Kret
2025-03-13 07:35:50 +02:00
committed by GitHub
parent ec8a719efa
commit b5632545c5
7 changed files with 149 additions and 9 deletions

View File

@@ -74,7 +74,9 @@ export async function getMappingColumns(
const options =
type === 'options' ? getEnumValues(enumInfo, col.udt_name as string) : undefined;
const hasDefault = Boolean(col.column_default);
const isGenerated = col.is_generated === 'ALWAYS' || col.identity_generation === 'ALWAYS';
const isGenerated =
col.is_generated === 'ALWAYS' ||
['ALWAYS', 'BY DEFAULT'].includes(col.identity_generation ?? '');
const nullable = col.is_nullable === 'YES';
return {
id: col.column_name,