Releases: adonisjs/lucid
Releases · adonisjs/lucid
Fix model.transaction method to behave exactly as db.transction
Bug Fixes
- Model.transaction always create a transaction and do not re-use existing one (1afdd81)
Full Changelog: v21.5.0...v21.5.1
Improvements to unique and exists rule and add isDirty method
Bug Fixes
Features
- add isDirty method (#1068) (151f862)
- add meta to all relations (#1042) (ade635f)
- add support for creating transaction client from model (4a2adcd)
- allow unique and exists validations to perform case insensitive search (761f823)
What's Changed
- feat: add meta to all relations by @zaosoula in #1042
- feat: add isDirty method by @adamcikado in #1068
- feat: unique accept options as object by @Xstoudi in #1012
New Contributors
Full Changelog: v21.4.0...v21.5.0
Export relationships query clients and allow instanceName config property
Features
What's Changed
- Add missing instanceName to the MssqlConnectionNode type by @Imunal in #1063
- feat: export relation's query client by @adamcikado in #1061
New Contributors
Full Changelog: v21.3.0...v21.4.0
Bug fixes and new features
- Feat: Add
loadOnce
method to preload a relationship only when its not already preloaded. - Feat: Add support for
--compact-output
inmigration:reset
andmigration:refresh
commands. - Feat: Export
Adapter
andModelPaginator
from the ORM. - Fix: Clone the preloader when cloning the query builder
Bug Fixes
- Clone the preloader when cloning the query builder (#1050) (18103ea)
- lint script (edc3d3a)
- run migration:reset via migrate test utils (9f669dd)
Features
- add support for --compact-output flag in reset and refresh commands (89322f9)
- export Adapter from orm (#1030) (cbbb4fd)
- export ModelPaginator class (#1051) (76dd1e5)
- orm: add loadOnce to lazy load a relationship only once (#1052) (96df6a6)
What's Changed
- export Adapter from orm by @siddiquipro in #1030
- feat: Export ModelPaginator Class by @aayush123 in #1051
- Clone the preloader when cloning the query builder by @RomainLanz in #1050
- feat(orm): add loadOnce by @RomainLanz in #1052
New Contributors
- @siddiquipro made their first contribution in #1030
Full Changelog: v21.2.0...v21.3.0
Pin strtok3 and fix relationship query builder to apply constraints on subqueries
- fix: pin strtok3 version 0699d06
- chore: update dependencies 45e43c1
- fix: apply constraints in whereIn condition (#1037) c131bc7
What's Changed
- fix: apply relationship constraints when using sub query in whereIn condition by @adamcikado in #1037
Full Changelog: v21.1.1...v21.2.0
Fix - Cleanup connection resources when using read replicas
- test: fix failing tests 14f345a
- test: add test for connection resource cleanup with replicas 2e002b7
- fix: connection resource cleanup logic a9eac4b
- fix: cleanup of resources when using replicas aa0a573
- chore: update dependencies 2aee01a
- chore: update dependencies 2d25ef0
Full Changelog: v21.1.0...v21.1.1
Display dialect names in configure prompts
- refactor: configure command to display dialect name in prompts 596c153
Fix for last release
- fix: broken import of libsql client 1afc648
Full Changelog: v21.0.0...v21.0.1
Support for libSQL and new health checks
This release adds first-class support for libSQL and removes all options + types + methods related to legacy way of doing health checks. Instead, you must use the following two classes to register health checks with AdonisJS v6.
import db from '@adonisjs/lucid/services/db'
import { DbConnectionCountCheck, DbCheck } from '@adonisjs/lucid/database'
new HealthChecks().register([
new DbCheck(db.connection()),
new DbConnectionCountCheck(db.connection())
])
Breaking changes
- The
config.healthCheck
property - Remove
connection.getReport
method. - Remove
connectionManager.report
method. - Remove
ReportNode
type.
Deprecations
- Deprecate
connection.dialectName
in favor ofconnection.clientName
. TheclientName
refers to the npm clients you can use with Knex anddialectName
refers to the Lucid dialects. One dialect can be used with multiple clients. For example, the MySQL dialect can be used withmysql
andmysql2
clients.
Commits
- test: another attempt at fixing broken tests 8a4df1c
- test: fix breaking tests 2d9697b
- refactor: update usages of dialectName with clientName 7fedbfe
- feat: add support for libsql and cleanup clients to dialects mapping 95f11d1
- feat: export health check classes 1b32dca
- feat: add database health checks and remove legacy health check flag 0373e7f
- refactor: remove legacy health checks 32f377e
- test: fix broken types 44da18c
- chore: update peer dependencies 9dbd7fc
- chore: update dependencies bdc32b5
Full Changelog: v20.6.0...v21.0.0
Improvements to the DateTime comparison when using "orCreate" methods
In this release, we improve the comparison logic used by firstOrCreate
, firstOrNew
, and updateOrCreate
methods to properly compare Luxon DateTime instances when finding or persisting a new row.
Commits
- Merge pull request #991 from adamcikado/develop 94b666a
- fix: compare DateTime in newUpIfMissing 669bdb3
- Merge pull request #1017 from adamcikado/feat/exports 92ed475
- fix: some typos (#1024) ba5961b
- chore: update postgresql version 7315d0e
- chore: update version & add cross-env 52906a5
- Merge pull request #1023 from MaximeMRF/fix/step-option-migrator b084678
- fix(migrator): step option 781c479
- feat: add missing exports 5d87cf8
What's Changed
- fix(migrator): step option by @MaximeMRF in #1023
- fix some typos by @TiBianMod in #1024
- feat: add missing exports by @adamcikado in #1017
- fix: compare DateTime in newUpIfMissing by @adamcikado in #991
New Contributors
- @TiBianMod made their first contribution in #1024
- @adamcikado made their first contribution in #1017
Full Changelog: v20.5.1...v20.6.0