xnuinside / simple-ddl-parser

Simple DDL Parser to parse SQL (HQL, TSQL, AWS Redshift, BigQuery, Snowflake and other dialects) ddl files to json/python dict with full information about columns: types, defaults, primary keys, etc. & table properties, types, domains, etc.
MIT License
183 stars 41 forks source link

MsSQL - IDENTITY(1,1) when placed after KEY #261

Open hubg398 opened 4 months ago

hubg398 commented 4 months ago

Parser fails when IDENTITY(1,1) comes after KEYs in column def.

This fails:

create table Customer (
   Id int PRIMARY KEY IDENTITY(1,1),
)

This works

create table Customer (
   Id int IDENTITY(1,1) PRIMARY KEY,
)
xnuinside commented 4 months ago

@hubg398 thanks for opening new issues, I don’t have much time on this week, maybe I will have some hours on weekends

hubg398 commented 4 months ago

Hey @xnuinside for sure, was more logging them here to track them bugs, not expecting any urgency in fixing :)

Thanks again