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

@@ -92,7 +92,9 @@ export const getMySQLQuery = (
',"ordinal_position":', cols.ordinal_position,
',"nullable":', IF(cols.is_nullable = 'YES', 'true', 'false'),
',"default":"', ${withExtras ? withDefault : withoutDefault},
'","collation":"', IFNULL(cols.collation_name, ''), '"}'
'","collation":"', IFNULL(cols.collation_name, ''),
'","is_identity":', IF(cols.extra LIKE '%auto_increment%', 'true', 'false'),
'}'
)))))
), indexes as (
(SELECT (@indexes:=NULL),