Skip to content

Releases: adonisjs/lucid

Update `make:model` command to optionally generate migration & controller

21 Sep 15:09
Compare
Choose a tag to compare
  • refactor: format source files 620789c
  • refactor: use child_process.execFile over kernel.exec command 86f4d69
  • feat(cli): allow us to generate a controller & migration at the same time (#526) 3d06be2
  • Fixing typo in Run command. (#597) 0fc3e23

v8.4.2...v8.4.3

Fix orderBy and nullable datetime columns bug

28 Aug 16:03
Compare
Choose a tag to compare
  • style: format source files e10c01e
  • fix: orderBy transformer array of keys to model column names 6b84db3
  • fix: allow datetime columns to be nullable 71908f3
  • chore(package): update dependencies 3a8551a
  • chore: remove lock file from the repository 26cb39c

v8.4.1...v8.4.2

Fix for v8.4.0

15 Aug 18:16
Compare
Choose a tag to compare
  • fix: typo in instructions file name 13196ac

v8.4.0...v8.4.1

Bug fixes and lots of improvements

15 Aug 13:05
Compare
Choose a tag to compare

Highlights

  • The paginate method output now extends Array class. So it allows you to loop over the rows directly.
  • You can define per connection multiple seed directories.
  • The node ace invoke @adonisjs/lucid command now prompts for setting up the right databases

Commits

  • style: format source files 102ec3c
  • improvement: query.select allow raw queries adf41d8
  • improvement: allow factory callback to return model instance over just attributes d1603b0
  • feat: add isActive property to paginator.getUrlsForRange method output 7d7d0dd
  • improvement: SimplePaginator extend Array to allow iterating over rows 008ea24
  • style: format source files 6e420f0
  • improvement: normalize --files property values da67e56
  • improvement: make relatedQuery and relatedSubQuery compatible with each other 31d25ed
  • style: format source code 6017852
  • fix: invoke "onQuery" when creating subQuery 184cdec
  • fix: rename opaque hint property name from "type" to "__opaque_type" 71c882f
  • improvement: use app.directoriesMap to pull migrations and seeds path 469cde0
  • improvement: improving seeds and migrations flow 4a6acad
  • refactor: change method for resolving migrations directories d818980
  • fix(validator): allow passing where constraints to rules with refs (#583) 16b6882
  • improvement: improving the auto setup flow 904d31e
  • chore: register instructions file with adonisjs block 2fa6d90
  • feat: add instructions to auto-install DBMS (#569) 16168a1

v8.3.1...v8.4.0

Adding support for case insensitive search in unique and exists rules

04 Aug 18:05
Compare
Choose a tag to compare
  • fix(validator): use prepared statements with unique and exists rules f10656b
  • test: fix breaking tests 4dc1c29
  • docs(README): add audit badge and update urls 417ac9d
  • improvement: allow case-insensitive unique and exists queries 29f7dfc
  • test: write tests for the provider 7bc9b7a

v8.3.0...v8.3.1

Wooah! We have got new relationship helper methods

04 Aug 09:14
Compare
Choose a tag to compare

Finally, the support for whereHas, has and withCount methods has been added to model query builder. The idea is to limit the parent rows based upon the existence of relationship. Docs will cover more about the usage

  • test: fix breaking tests 6175dbb
  • style: fix eslint errors 963b903
  • fix(migrator): getList method create schema table when missing d982261
  • feat: add support for has and whereHas methods b159609
  • fix: db credentials in .env file af10ecf
  • style: format source files 269697a
  • docs(contributing): fix link to contributing file dc62011
  • feat: allow defining custom alias for the withCount query df61f1d
  • feat: add support for withCount 469f193
  • fix: update method handle use case where values are falsy 232f16a
  • chore: integrate prettier and update source files 1fd882a
  • chore: update dependencies b4a38a3
  • improvement: allow dateTime columns to be optional 853822a

v8.2.2...v8.3.0

Added BaseSeeder and accept connection,client in model factories

21 Jun 05:49
Compare
Choose a tag to compare
  • improvement: update seeder template to use BaseSeeder f41a92d
  • improvement: allow passing model adapter options via the query method c5e44ac
  • feat: add BaseSeeder abd0882
  • feat: allow defining custom connection and client in factories fd64466
  • fix: prefix seeder to the class name 4d9ab93

v8.2.1...v8.2.2

Fixes to factories and seeds commands

20 Jun 20:06
Compare
Choose a tag to compare
  • fix: persist belongs to before persisting the parent model 380d684
  • improvement: close connections after db:seed command daab588
  • fix: use directories.seeds path over seedsPath directory fd2ce31

v8.2.0...v8.2.1

Adding support for factories and seeds

20 Jun 18:37
Compare
Choose a tag to compare
  • chore: update validator 1a6ed3b
  • refactor: register seeds typings bf1e082
  • refactor: bind Adonis/Lucid/Factory to ioc container 7a0c370
  • chore: update dependencies 1772663
  • feat: add support for seeders a213661
  • feat: allow defining custom handler for generating stub ids e755e2e
  • feat: add fakerjs fe0febe
  • feat: implement factory model hooks and add ids stub calls d494f13
  • improvement: rename to 4563a00
  • improvement: improve overall factories API 7d8398c
  • fix: pivot table insert attributes 934c33d
  • ci: add debug log 0952dcc
  • improvement: cleanup factory relationships structure 80d63d7
  • chore: fix linting issues 28dae25
  • feat: implement core of the factories 5c65731
  • test: add test for select statement 3d50f77
  • fix(commands): correct typo in migration:status description 3141153
  • fix(QueryBuilder): support falsy values in between pairs (#556) 2d2e7cb
  • test: await the call to refresh ff9fb2e
  • feat(Model): make refresh chainable d09e3b5
  • improvement(Model): make merge, fill & save chainable (#554) 7a518d8
  • feat: add toObject method to model fa8ae6e
  • improvement: remove max listeners limit from transaction client 1b99bb8
  • fix: cast page and limit to numbers, since paginate receives input from the HTTP request bd38a5d
  • fix: use deep equal diff to find dirty values 5ebbc9e
  • fix: transform query aliases to lowercase, since postgresql converts them to lowercase ccc1ca4
  • test: update expose port in docker test file ecfb1c6
  • test: skip dialect version check for now a1e9079
  • test: add tests to ensure that relationship query builder handles groupLimit properly 4e5f262
  • feat: implement groupLimit for relationship preloading def372c
  • chore: update dependencies 76037a6
  • refactor: move relationships persistance hydration to relation class e443b20

v8.1.1...v8.2.0

Adding pagination hooks and bug fixes

15 May 06:38
Compare
Choose a tag to compare

Pagination hooks

We have added ORM hooks for pagination too.

beforePaginate

class User extends BaseModel {
  @beforePaginate()
  public static someMethod ([countQuery, query]) {
  }
}

afterPaginate

class User extends BaseModel {
  @afterPaginate()
  public static someMethod (paginator) {
    console.log(paginator.all())
    console.log(paginator.total)
  }
}

Commits

  • chore: update dependencies f7bd18f
  • feat: add pagination hooks 1f9b1d3
  • fix: re-compute dirty properties after initiating auto update columns b309acb
  • chore: update dependencies ef3cf10
  • fix(serialization): pick all fields when pick property is undefined fa0a214
  • improvement: updateOrCreate and updateOrCreateMany can handle concurrent updates too 5bee648
  • chore: update dependencies 4754a8c
  • chore: update dependencies ed90d3a

v8.1.0...v8.1.1