Skip to content

Releases: adonisjs/lucid

Custom schema rules correctly override default decorators

05 Apr 09:22

Choose a tag to compare

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:

  1. decorators array format: default decorators were concatenated with user-defined ones instead of being replaced (e.g.
    [@column(), @decimal()] instead of just [@decimal()])
  2. 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

31 Mar 07:50

Choose a tag to compare

This release unlock Knex version

Add test assertion helpers, support for multiple decorators and bug fixes

30 Mar 04:49

Choose a tag to compare

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

New Contributors

Full Changelog: v22.3.0...v22.4.0

Make transformer alongside model and update scaffolding commands to accept stub path from CLI

28 Mar 06:20

Choose a tag to compare

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

23 Mar 11:18

Choose a tag to compare

22.2.0 (2026-03-23)

Bug Fixes

  • prevent primary key columns from being marked as nullable in generated schema (fe5caa4)
  • use parameterized bindings and knex.ref() for SQL identifiers across dialects and vinejs bindings (6245220)

Features

Fix primary keys detection in schema generation and generate schema classes for non-public PostgreSQL schemas

12 Mar 06:24

Choose a tag to compare

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

06 Mar 15:31

Choose a tag to compare

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

25 Feb 07:04

Choose a tag to compare

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

Full Changelog: v21.8.0...v22.0.0

Add toAttributes method to convert model to a type-safe object with only the attributes

10 Feb 10:13

Choose a tag to compare

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

04 Feb 16:38

Choose a tag to compare

22.0.0-next.8 (2026-02-04)

Bug Fixes

  • prevent redundant loadOnce on null 1:1 preloads (#1142) (25d651f)

Features

  • extend BaseTransformer method Lucid specific aggregate methods (16ff8d2)

What's Changed

Full Changelog: v22.0.0-next.7...v22.0.0-next.8