bun v1.0.25 Release Notes

Release Date: 2022-02-22 // about 2 years ago
  • ๐Ÿ› Bug Fixes

    ๐Ÿ—„ Deprecated

    ๐Ÿš€ 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.

    โš  To fix warnings, add missing options:

    type Model struct {
    -    ID int64
    +    ID int64 `bun:",pk,autoincrement"`
    }
    

    โš  To silence warnings:

    bun.SetWarnLogger(log.New(ioutil.Discard, "", log.LstdFlags))
    

    โš  Bun will also print a warning on soft delete โš  fields without a ,nullzero option. You can fix the warning by adding missing ,nullzero or ,allowzero options.

    ๐Ÿšš In v1.1.x, such options as ,nopk and ,allowzero will not be necessary and will be removed.

    ๐Ÿ› Bug Fixes

    • ๐Ÿ›  fix missing autoincrement warning (3bc9c72)

    • append slice values (4a65129)

    • don't automatically set pk, nullzero, and autoincrement options (519a0df)

    ๐Ÿ”‹ Features

    • โž• add CreateTableQuery.DetectForeignKeys (a958fcb)