drizzle-kit@0.24.1
drizzle-team/drizzle-ormdrizzle-kit@0.24.1Aug 22, 2024by github-actions[bot]
AI Summary
This is a bug fix release for Drizzle Kit CLI's introspect command, addressing multiple critical issues with database schema introspection across PostgreSQL and MySQL dialects. The release fixes the CLI not working properly, adds support for special characters in column names, includes PostgreSQL sequences in introspection, and resolves various type casting and default value issues.
Key Highlights
- Fixed Drizzle Kit CLI introspect command not working properly
- Added support for column names with special characters for all dialects
- Included PostgreSQL sequences in the introspection process
- Reworked array type introspection with comprehensive test cases
- Fixed PostgreSQL default value issues by removing '::<type>' from introspected output
- Fixed the 'preserve' casing option which was broken
New Features
- Support for column names with special characters across all dialects
- PostgreSQL sequences now included in introspection
- Improved array type introspection with full test coverage
Full Release Notes
## Bug fixes > Big thanks to @L-Mario564 for his [PR](https://github.com/drizzle-team/drizzle-orm/pull/2804). It conflicted in most cases with a PR that was merged, but we incorporated some of his logic. Merging it would have caused more problems and taken more time to resolve, so we just took a few things from his PR, like removing "::<type>" mappings in introspect and some array type default handlers ### What was fixed 1. The Drizzle Kit CLI was not working properly for the `introspect` command. 2. Added the ability to use column names with special characters for all dialects. 3. Included PostgreSQL sequences in the introspection process. 4. Reworked array type introspection and added all test cases. 5. Fixed all (we hope) default issues in PostgreSQL, where `::<type>` was included in the introspected output. 6. `preserve` casing option was broken ### Tickets that were closed - [[BUG]: invalid schema generation with drizzle-kit introspect:pg](https://github.com/drizzle-team/drizzle-orm/issues/1210) - [[BUG][mysql introspection]: TS error when introspect column including colon](https://github.com/drizzle-team/drizzle-orm/issues/1928) - [[BUG]: Unhandled defaults when introspecting postgres db](https://github.com/drizzle-team/drizzle-orm/issues/1625) - [[BUG]: PostgreSQL Enum Naming and Schema Typing Issue](https://github.com/drizzle-team/drizzle-orm/issues/2315) - [[BUG]: drizzle-kit instrospect command generates syntax error on varchar column types](https://github.com/drizzle-team/drizzle-orm/issues/2714) - [[BUG]: Introspecting varchar[] type produces syntactically invalid schema.ts](https://github.com/drizzle-team/drizzle-orm/issues/1633) - [[BUG]: introspect:pg column not using generated enum name](https://github.com/drizzle-team/drizzle-orm/issues/1648) - [[BUG]: drizzle-kit introspect casing "preserve" config not working](https://github.com/drizzle-team/drizzle-orm/issues/2773) - [[BUG]: drizzle-kit introspect fails on required param that is defined](https://github.com/drizzle-team/drizzle-orm/issues/2719) - [[BUG]: Error when running npx drizzle-kit introspect: "Expected object, received string"](https://github.com/drizzle-team/drizzle-orm/issues/2657) - [[BUG]: Missing index names when running introspect command [MYSQL]](https://github.com/drizzle-team/drizzle-orm/issues/2525) - [[BUG]: drizzle-kit introspect TypeError: Cannot read properties of undefined (reading 'toLowerCase')](https://github.com/drizzle-team/drizzle-orm/issues/2338) - [[BUG]: Wrong column name when using PgEnum.array()](https://github.com/drizzle-team/drizzle-orm/issues/2100) - [[BUG]: Incorrect Schema Generated when introspecting extisting pg database](https://github.com/drizzle-team/drizzle-orm/issues/1985) - [[⚠️🐞BUG]: index() missing argument after introspection, causes tsc error that fails the build](https://github.com/drizzle-team/drizzle-orm/issues/1870) - [[BUG]: drizzle-kit introspect small errors](https://github.com/drizzle-team/drizzle-orm/issues/1738) - [[BUG]: Missing bigint import in drizzle-kit introspect](https://github.com/drizzle-team/drizzle-orm/issues/1020)