Releases: adonisjs/lucid
Releases · adonisjs/lucid
Custom schema rules correctly override default decorators
22.4.2 (2026-04-05)
Bug Fixes
- schema-generator: prevent default decorators from leaking into custom schema rules
(66e0a5ce)
loadRules() was using deepmerge without custom merge strategies, which caused two issues:
- decorators array format: default decorators were concatenated with user-defined ones instead of being replaced (e.g.
[@column(), @decimal()]instead of just[@decimal()]) - Deprecated decorator string format: the default decorators array took precedence over the user's decorator string,
silently ignoring it
Custom type and column rules now correctly replace the defaults.
Unlock Knex version
This release unlock Knex version
Add test assertion helpers, support for multiple decorators and bug fixes
22.4.0 (2026-03-30)
Bug Fixes
Features
- assertion testing helpers (#1161) (8a5cd06)
- handle invalid JS identifiers in schema generator and add structured decorators (e150d15), closes #1166
What's Changed
- fix: with count query by @enixsoft in #1156
- feat: assertion testing helpers by @Julien-R44 in #1161
New Contributors
Full Changelog: v22.3.0...v22.4.0
Make transformer alongside model and update scaffolding commands to accept stub path from CLI
22.3.0 (2026-03-28)
Features
- add --contents-from flag and --transformer support to make commands (b07ec04)
Full Changelog: v22.2.0...v22.3.0
Pin Knex to version 3.1.0
Fix primary keys detection in schema generation and generate schema classes for non-public PostgreSQL schemas
22.1.1 (2026-03-12)
Bug Fixes
- add getPrimaryKeys to transaction client (25a8965)
- detect primary keys from database instead of hardcoding id column (6375708)
- make dialects schema-aware for non-public PostgreSQL schemas (6993d07), closes #1147
- use string instead of text for primary key test columns (2f277ed)
Full Changelog: v22.1.0...v22.1.1
Add support for CTE and onConflict expression builder support to InsertQueryBuilder
22.1.0 (2026-03-06)
Bug Fixes
- guard dialect-specific insert tests for mssql and mysql compatibility (b19c048)
- sort columns alphabetically in schema generator for deterministic output (7b12c6a)
Features
- add onConflict, CTE, and comment support to InsertQueryBuilder (a92abf7)
Full Changelog: v22.0.0...v22.1.0
Tables to model schema generation and integration with Transformers
22.0.0 (2026-02-25)
Please check all 22.0.0 pre-releases to get a better sense of what changed
Bug Fixes
- prevent redundant loadOnce on null 1:1 preloads (#1142) (25d651f)
- broken types (d7ada34)
- handle Database.raw in prepare method for update operations (17aa2bf), closes #1079
- properly quote column names in groupLimit window functions (5922062), closes #1110
- truncateAll implementation of sqlite and MSSQL (f559bf7)
- types generation when same data type varies among dialects (f1e62f7)
Features
- add toAttributes method to BaseModel and LucidRow (2d9d1f0)
- extend BaseTransformer method Lucid specific aggregate methods (16ff8d2)
- add auto-booting to BaseModel for models without decorators (b650cca)
- change make:model stub to use Schema class (166859a)
- exclude migrations table from schema generation (6a107e7)
- allow column name to be optional in unique and exists rule (f6e41c1)
- add support for generating schema classes (d71bedb)
- add support for table-qualified column aliases in models (e9dcde4)
- add truncateAllTables method to dialects and query client (ddd7e74)
What's Changed
- fix: nullable relation types by @aadamcik in #1130
- fix: prevent redundant loadOnce on null 1:1 preloads by @Julien-R44 in #1142
Full Changelog: v21.8.0...v22.0.0
Add toAttributes method to convert model to a type-safe object with only the attributes
Pre-release
22.0.0-next.9 (2026-02-10)
Features
- add toAttributes method to BaseModel and LucidRow (2d9d1f0)
Full Changelog: v22.0.0-next.8...v22.0.0-next.9
Extend BaseTransformer method Lucid specific aggregate methods
22.0.0-next.8 (2026-02-04)
Bug Fixes
Features
- extend BaseTransformer method Lucid specific aggregate methods (16ff8d2)
What's Changed
- fix: prevent redundant loadOnce on null 1:1 preloads by @Julien-R44 in #1142
Full Changelog: v22.0.0-next.7...v22.0.0-next.8