Skip to content

Commit

Permalink
chore: update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
vmihailenco committed Feb 22, 2022
1 parent e27cfb4 commit 49fd3ec
Showing 1 changed file with 31 additions and 5 deletions.
36 changes: 31 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit 49fd3ec

Please sign in to comment.