From 49fd3ec3609f5d4d7c24c594d12f621c998f7d4a Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Tue, 22 Feb 2022 10:51:30 +0200 Subject: [PATCH] chore: update changelog --- CHANGELOG.md | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a03469daa..a651210f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,43 @@ ## [1.0.23](https://github.com/uptrace/bun/compare/v1.0.22...v1.0.23) (2022-02-22) +### Deprecated -### Bug Fixes +In the comming v1.1.x release, Bun will stop automatically adding `,pk,autoincrement` options on +`ID int64/int32` fields. This version (v1.0.23) only prints a warning when it encounters such +fields, but the code will continue working as before. -* append slice values ([4a65129](https://github.com/uptrace/bun/commit/4a651294fb0f1e73079553024810c3ead9777311)) -* don't automatically set pk, nullzero, and autoincrement options ([519a0df](https://github.com/uptrace/bun/commit/519a0df9707de01a418aba0d6b7482cfe4c9a532)) +To fix warnings, add missing options: +```diff +type Model struct { +- ID int64 ++ ID int64 `bun:",pk,autoincrement"` +} +``` -### Features +To silence warnings: + +```go +bun.SetWarnLogger(log.New(ioutil.Discard, "", log.LstdFlags)) +``` + +Bun will also print a warning on [soft delete](https://bun.uptrace.dev/guide/soft-deletes.html) +fields without a `,nullzero` option. You can fix the warning by adding missing `,nullzero` or +`,allowzero` options. -* add CreateTableQuery.DetectForeignKeys ([a958fcb](https://github.com/uptrace/bun/commit/a958fcbab680b0c5ad7980f369c7b73f7673db87)) +In v1.1.x, such options as `,nopk` and `,allowzero` will not be necessary and will be removed. +### Bug Fixes + +- append slice values + ([4a65129](https://github.com/uptrace/bun/commit/4a651294fb0f1e73079553024810c3ead9777311)) +- don't automatically set pk, nullzero, and autoincrement options + ([519a0df](https://github.com/uptrace/bun/commit/519a0df9707de01a418aba0d6b7482cfe4c9a532)) + +### Features +- add CreateTableQuery.DetectForeignKeys + ([a958fcb](https://github.com/uptrace/bun/commit/a958fcbab680b0c5ad7980f369c7b73f7673db87)) ## [1.0.22](https://github.com/uptrace/bun/compare/v1.0.21...v1.0.22) (2022-01-28)