Skip to main content

durcno@1.0.0-alpha.26

Patch Changes​

  • d8fd84c - Thanks to @almahdi404 !

    fix(migrations): use backticks instead of quotes on column types

    Fixes generated migration statements for addColumn and alterColumnType to wrap column types in template literal backticks instead of double quotes.

    This prevents syntax errors in generated migrations when column types contain double quotes, such as qualified enum types (e.g., "public"."role"), aligning them with createTable column definitions.

  • 7eb8f4e - Thanks to @almahdi404 !

    fix(cli/generate): correct column and index statement ordering in migrations

    The generate command produced migrations with incorrect DDL ordering, causing PostgreSQL errors when columns and indexes changed together on the same table.

    Two issues were fixed in generateAlterTableStmts:

    • Missing dropIndex: removed indexes were never emitted as ddl.dropIndex(), so dropping a column that had an index would fail.
    • createIndex before addColumn: new index statements were emitted before the alterTable block containing addColumn, so indexing a newly added column would fail.

    The corrected order is now: dropIndex → alterTable → createIndex.