summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/schema/field.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-09-23 11:13:28 +0200
committerLibravatar GitHub <noreply@github.com>2021-09-23 11:13:28 +0200
commit142f37f1bd0291f74e12002931d05174f3a31741 (patch)
treed2e5d80df32a0217a442cfd9ba207d5e88879b77 /vendor/github.com/uptrace/bun/schema/field.go
parentupdate media processing (#244) (diff)
downloadgotosocial-142f37f1bd0291f74e12002931d05174f3a31741.tar.xz
upstep bun version (#243)
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema/field.go')
-rw-r--r--vendor/github.com/uptrace/bun/schema/field.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/uptrace/bun/schema/field.go b/vendor/github.com/uptrace/bun/schema/field.go
index 1e069b82f..59990b924 100644
--- a/vendor/github.com/uptrace/bun/schema/field.go
+++ b/vendor/github.com/uptrace/bun/schema/field.go
@@ -101,7 +101,9 @@ func (f *Field) ScanValue(strct reflect.Value, src interface{}) error {
func (f *Field) markAsPK() {
f.IsPK = true
f.NotNull = true
- f.NullZero = true
+ if !f.Tag.HasOption("allowzero") {
+ f.NullZero = true
+ }
}
func indexEqual(ind1, ind2 []int) bool {