Skip to content

0.23.0

Compare
Choose a tag to compare
@nene nene released this 17 Jan 12:12
· 327 commits to master since this release

Breaking changes

  • The constraint_deferrable node has been replaced with array of constraint_modifier nodes.
    Accordingly the deferrable field in constraint node has been renamed to modifiers.
  • onConflict field has been replaced with clauses array.
    The affects: constraint_primary_key, constraint_unique, constraint_check, constraint_not_null.
  • Various *Kw fields have been replaced with kind field that contains table_kind node:
    • in create_table_stmt: temporaryKw, unloggedKw, externalKw, snapshotKw, virtualKw.
    • in drop_table_stmt: temporaryKw, externalKw, snapshotKw.
    • in into_table_clause: temporaryKw, unloggedKw.
  • The sort_specification node has been replaced with index_specification node in places that reference indexes.
    This effects: constraint_primary_key, create_index_stmt, upsert_clause.

Bugfixes

  • MySQL column KEY constraint is now parsed as constraint_primary_key (instead of constraint_index).
  • doKw field in upsert_clause now has correct type: Keyword<"DO"> (instead of Keyword<"DOR">).

Improved MySQL/MariaDB support

  • Improved CREATE TABLE support:

    • Support index name in FOREIGN KEY
    • Support TABLESPACE & STORAGE options
    • Support UNION option
    • Support [NOT] ENFORCED modifier on CHECK() constraint
  • Improved ALTER TABLE support:

    • Support ALTER COLUMN (SET {VISIBLE | INVISIBLE})
    • Support ADD CONSTRAINT
    • Support DROP CONSTRAINT
    • Support ALTER CONSTRAINT

Improved PostgreSQL support

  • Almost complete CREATE TABLE support:

    • Support DEFAULT expr
    • Support STORAGE constraint
    • Support COMPRESSION constraint
    • Support GENERATED AS IDENTITY
    • Support UNIQUE NULLS [NOT] DISTINCT
    • Support SET NULL/DEFAULT with columns inside REFERENCES action
    • Support GLOBAL|LOCAL TEMP TABLE
    • Support UNLOGGED TABLE
    • Support NO INHERIT constraint modifier
    • Support CREATE TABLE .. INHERITS ()
    • Support PARTITION BY clause
    • Support PARTITION OF
    • Support MINVALUE & MAXVALUE FOR VALUES
    • Support FOR VALUES WITH ... MODULUS & REMAINDER
    • Support ON COMMIT clause
    • Support TABLESPACE clause
    • Support USING clause
    • Support WITH clause
    • Support WITHOUT OIDS clause
    • Support CREATE TABLE .. OF type
    • Support EXCLUDE constraint
    • Support LIKE clause inside columns list
    • Support index parameter clauses
    • Support WITH OPTIONS column definitions
    • Support CREATE TABLE AS .. WITH [NO] DATA
  • Basic ALTER TABLE support:

    • Support [ONLY] name [*]
    • Support CASCADE|RESTRICT in ALTER TABLE .. DROP COLUMN
    • Support ALTER COLUMN .. SET NOT NULL
    • Support basic ALTER COLUMN .. SET DATA TYPE
    • Support ADD CONSTRAINT
    • Support DROP CONSTRAINT
    • Support ALTER CONSTRAINT
    • Support RENAME CONSTRAINT
    • Support VALIDATE CONSTRAINT
  • Basic CREATE/DROP INDEX support