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
179 stars 40 forks source link

Oracle create table with default value is not working #176

Closed ancc closed 1 year ago

ancc commented 1 year ago

Following create table statement is not recognized by the parser, which is valid statement for Oracle database.

from simple_ddl_parser import DDLParser
DDLParser("create table test ( col varchar2(30 char) default user not null);").run()

result is empty list.

python version 3.9.5 simple-ddl-parser==0.29.0

xnuinside commented 1 year ago

@ancc hi! thanks for opening the issue, sorry for the delay with answer. I released fix in version 0.29.1 and added the test https://github.com/xnuinside/simple-ddl-parser/pull/179/files#diff-ff905774288e5cd43c5adcde46191c8990ae3fc1472fe5315344493aa946aade . Feel free to open new issue if will be needed!