fix: add auto-increment field detection in smart-query import (#935)

This commit is contained in:
Jonathan Fishner
2025-09-28 17:09:02 +03:00
committed by GitHub
parent bb033091b1
commit 57b3b8777f
8 changed files with 45 additions and 7 deletions

View File

@@ -91,6 +91,11 @@ cols AS (
WHEN cols.COLLATION_NAME IS NULL THEN 'null'
ELSE '"' + STRING_ESCAPE(cols.COLLATION_NAME, 'json') + '"'
END +
', "is_identity": ' + CASE
WHEN COLUMNPROPERTY(OBJECT_ID(cols.TABLE_SCHEMA + '.' + cols.TABLE_NAME), cols.COLUMN_NAME, 'IsIdentity') = 1
THEN 'true'
ELSE 'false'
END +
N'}') COLLATE DATABASE_DEFAULT
), N','
) +