Skip to content

v0.2.2

Choose a tag to compare

@flvmnt flvmnt released this 02 Mar 15:24
· 145 commits to main since this release

ORM Extractor Overhaul

Comprehensive audit and fix of all 6 ORM extractors (TypeORM, Knex, Sequelize, Prisma, Drizzle, raw SQL), cross-referenced against official ORM documentation.

Knex

  • Fix references().inTable() chain producing invalid SQL
  • Fix unescaped single quotes in DEFAULT values
  • Add createTableIfNotExists, dropTableIfExists, table() alias support
  • Add timestamps() column generation (created_at, updated_at)
  • Add .alter() modifier: emits ALTER COLUMN TYPE instead of ADD COLUMN
  • Add setNullable()/dropNullable() support
  • Add dropColumns() plural form
  • Double-quote all identifiers to handle reserved words

Sequelize

  • Filter to up() method only (was incorrectly analyzing down())
  • Add addConstraint/removeConstraint support (UNIQUE, FK, CHECK)
  • Add onDelete/onUpdate support on constraints and column-level references
  • Parse addIndex options: concurrently, unique, name
  • Detect Sequelize.literal() as volatile default
  • Fix unescaped single quotes in DEFAULT values
  • Thread filePath through all transpile functions
  • Double-quote all identifiers

TypeORM

  • Detect and warn on builder API usage (createTable, addColumn, etc.)
  • Expand from 13 to 40+ builder methods (dropTable, clearTable, check/exclusion constraints, views, schemas, all plural variants)
  • Fix addUniqueConstraint to createUniqueConstraint (matching actual API)

Testing

  • 167 tests (up from 153), all passing
  • 14 new fixture files covering every fix