Skip to content

Releases: xnuinside/simple-ddl-parser

1.13.0 - Huge bug fixies release

28 Mar 22:25

Choose a tag to compare

[1.13.0] - 2026-03-29

Added

  • None.

Changed

  • None.

Fixed

  • HQL/Spark SQL nested complex types like ARRAY<STRUCT<... COMMENT '...'> now parse correctly when inner STRUCT fields include COMMENT '...', instead of failing in strict mode. #137
  • MySQL dump-style DDL files now parse more reliably: DROP TABLE IF EXISTS is supported in parser output and no longer fails in strict mode, inline /*...*/ comment placeholders inside identifiers are handled, and table-level KEY / UNIQUE KEY definitions with prefix lengths like column(32) are supported. #148
  • MySQL-style ALTER TABLE ... ADD CONSTRAINT ... FOREIGN KEY constraint_name (...) REFERENCES ... statements now parse correctly instead of failing on the duplicated foreign key name. ALTER TABLE ... DROP FOREIGN KEY ... is also supported, and simple DROP VIEW / CREATE VIEW ... AS ... statements are now recognized in parser output. #149
  • HQL primitive generic array types like array<string> now parse without failing on the closing > token. #192
  • TRUNCATE TABLE schema.table statements now return the affected table in parser output instead of being skipped. #190
  • Mixed SQLite/MySQL dump files now ignore wrapper/admin statements such as PRAGMA, BEGIN TRANSACTION, LOCK/UNLOCK TABLES, and CREATE/DROP USER instead of failing in strict mode. DROP DATABASE [IF EXISTS] is now parsed as its own output statement, and MySQL ALTER TABLE ... AUTO_INCREMENT = ... updates table output plus alter["auto_increments"]. #146
  • MySQL issue-style upgrade scripts now parse ALTER TABLE ... DEFAULT CHARACTER SET ... COLLATE ... without failing in strict mode, and MySQL ALTER TABLE ... CHANGE old_col new_col type ... applies modified column metadata in parser output. #145
  • PostgreSQL/Greenplum-style PARTITION BY ... (PARTITION ... VALUES(...) WITH (...)) table definitions no longer return an empty result when partition definitions follow PARTITION BY. #118

1.12.0 Bug Fixies & CREATE AS SELECT statement support

27 Mar 11:21

Choose a tag to compare

[1.12.0] - 2026-03-27

Added

  • Support for CREATE TABLE ... AS SELECT ... FROM source_table when the referenced source table exists in the same DDL input. #216

Changed

  • Expanded README coverage for supported parser features, including the same-DDL CREATE TABLE ... AS SELECT ... limitation and recently added dialect features.

Fixed

  • PostgreSQL GENERATED ALWAYS AS IDENTITY(...) column definitions now parse with identity options like INCREMENT BY and NO CYCLE. #257
  • PostgreSQL GENERATED ALWAYS AS (...) STORED now parses complex CASE expressions with regex/casts and nested function calls (for example ~ '^\d+$'::text with lpad(...)). #267 (Fix #267)
  • MySQL table-level UNIQUE constraint_name (...) definitions now parse without requiring the KEY keyword. #262
  • MSSQL column definitions now support PRIMARY KEY IDENTITY(1,1) when IDENTITY appears after PRIMARY KEY. #261
  • HQL/Athena quoted column names in backticks now parse correctly when the identifier contains spaces. #238

1.10.0 - Custom output schema support (built-in BigQuery schema)

01 Feb 14:38
b780dee

Choose a tag to compare

[1.10.0] - 2026-01-27

Added

  • Custom output schema support with built-in BigQuery schema conversion and a custom schema registry.
  • Tests for BigQuery custom schema output and user-registered schemas.
  • CLI support for custom_output_schema.
  • Examples directory with Python usage samples, documented in the README.
  • Tox as a development dependency.
  • BigQuery custom schema usage example.

Changed

  • Custom output schema bigquery now defaults the output mode to BigQuery for dialect-specific parsing.
  • Tox linting configuration now skips the local .venv directory.

Fixed

  • MySQL parsing for FOREIGN KEY constraints with ON DELETE SET NULL in multi-table DDL. #290
  • Preserved column-level reference handling for SET actions while supporting SET NULL constraints.

1.9.0 - Bug fixies & improvements release

24 Jan 15:27
2ce93d0

Choose a tag to compare

Improvements

  1. Updated black dependency to >=24,<26 - #307
  2. Added tests for MySQL COMMENT with unicode quotes - #308
  3. Switched linting to ruff + black and updated CI/pre-commit checks.

Fixes

  1. Fixed BigQuery OPTIONS parsing with unicode characters - #298
  2. Fixed MySQL table CHARACTER SET/CHARSET option parsing - #296
  3. Fixed MySQL composite index columns parsing - #311
  4. Fixed CREATE DATABASE IF NOT EXISTS parsing - #293

1.8.0 - added support for Informix/GBase 8s dialect

18 Jan 04:33

Choose a tag to compare

Important

  1. Python 3.7 and 3.8 support is deprecated. Minimum supported version is now Python 3.9.

Improvements

  1. Added support for Python 3.13.
  2. Added tox configuration for testing across multiple Python versions (3.9-3.13).

New Features

  1. Added support for COMMENT ON syntax (TABLE, COLUMN, SCHEMA, DATABASE) - #301
  2. Added support for Informix/GBase 8s dialect - #299
    • Informix data types: SERIAL, SERIAL8, BIGSERIAL, INT8, LVARCHAR, TEXT, BYTE, BLOB, CLOB, MONEY, NCHAR, NVARCHAR
    • DATETIME YEAR TO SECOND/FRACTION/DAY syntax
    • INTERVAL HOUR TO MINUTE/DAY TO DAY/YEAR TO MONTH syntax
    • DEFAULT with Informix functions (TODAY, CURRENT, USER)
    • Storage options: IN dbspace, EXTENT SIZE, NEXT SIZE, LOCK MODE
    • GBase 8s Oracle-compatible types: VARCHAR2, NVARCHAR2, NUMBER
    • GBase 8s virtual columns: column AS (expression), GENERATED ALWAYS AS (expression)

Fixes

  1. Fixed Snowflake sequence NEXTVAL in column default value - #295
  2. Fixed escape sequence handling for '=' in generated column expressions.
  3. Added support for ALTER TABLE with multiple column operations (ADD, DROP, MODIFY) - #300
    • Multiple ADD/DROP/MODIFY operations in a single ALTER statement (comma-separated)
    • ADD COLUMN syntax (with COLUMN keyword)
    • DROP without COLUMN keyword (Oracle style)
    • Note: dropped_columns and modified_columns in output are now lists instead of single dicts
  4. Fixed BigQuery OPTIONS parsing with unicode characters (em-dash, etc.) - #298
    • String literals now support any unicode characters in descriptions

Added Athena as output mode, refactoring & better support for '\\' strings

11 Aug 22:21
6494e42

Choose a tag to compare

IMPORTANT:

In this versions there is some output changes & fixes that can break your code.

  1. Now all arguments inside brackets are parsed as separate strings in the list.
    For example:
    file_format = (TYPE=JSON NULL_IF=('field') this was parsed like 'NULL_IF': "('field')",
    now it will be: 'NULL_IF': ["'field'"],

  2. Added separate tokens for EQ = and IN (previously they was parsed as IDs also - for internal info, for contributors.

  3. Some check statements in columns now parsed validly, also IN statements parsed as normal lists.
    So this statement include_exclude_ind CHAR(1) NOT NULL CONSTRAINT chk_metalistcombo_logicalopr
    CHECK (include_exclude_ind IN ('I', 'E')),

will produce this output:

{'check': {'constraint_name': 'chk_metalistcombo_logicalopr',
'statement': {'in_statement': {'in': ["'I'", "'E'"],
'name': 'include_exclude_ind'}}},

Fixes

  1. DEFAULT word now is not arriving in key 'default' (it was before in some cases)

New Features

  1. Added Athena output mode and initial support - #272

1.5.0 fix uniques in case of indexes / unique case for several columns

18 May 21:33

Choose a tag to compare

Fixes

  1. Now, unique set up to column only if it was only one column in unique constraint/index. Issue - #255
  2. Fixed issue when UNIQUE KEY was identified as primary key - #253

v1.4.0 ⭕ Oracle new output keywords - is_global & temp

14 May 20:27

Choose a tag to compare

Fixes

🔍 BigQuery:

  1. Indexes without schema causes issues in BigQuery dialect - fixed.

Improvements

⭕ Oracle:

  1. Added new output keywords in table definition - temp & is_global. Added support for create global temporary table - #182

1.3.0 🐘 PostgreSQL WITH TIME ZONE & 🔍 BigQuery PARTITION BY Improvements

11 May 16:55

Choose a tag to compare

Fixes

🐘 PostgreSQL:

  1. Timezone was moved out from type definition to keyword 'with_time_zone' it can be True (if with time zone) or False (if without)

🔍 BigQuery:

  1. Previously Range in RANGE_BUCKETS was parsed as a columns, now this behaviour is changed and
    range placed in own keyword - 'range' (can be array or str).
    Also for all ``*_TRUNC PARTITIONS` like DATETIME_TRUNC, TIMESTAMP_TRUNC, etc, second argument moved to arg 'trunc_by'

Improvements

🐘 PostgreSQL:

  1. Added support for PostgreSQL with / without time zone - #250

🔍 BigQuery:

  1. Added support for GENERATE_ARRAY in RANGE_BUCKETS #183

1.2.1 MySQL 🐬 & ⭕ Oracle & 🐘 PostgreSQL updates

09 May 12:55
ade1dd0

Choose a tag to compare

Fixes

🐬 MySQL:

  1. Fixed issue relative to auto_increment that caused empty output if auto_increment defined in table properties -
    #206

Improvements

🐬 MySQL:

  1. auto_increment added as property to mysql output

⭕ Oracle:

  1. Added support for constraint name in column definition - #203
  2. Added support for GENERATED (ALWAYS | (BY DEFAULT [ON NULL])) AS IDENTITY in column definition

🐘 PostgreSQL:

  1. Added support for CAST statement in column GENERATE ALWAYS expression - #198