summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/schema/table.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-01-15 14:08:07 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-15 14:08:07 +0100
commit6433a505820cfeb43990a3453a0ed8b24e432b7d (patch)
tree3f968a63d6a77991df95fde88ee0f08727f26eb6 /vendor/github.com/uptrace/bun/schema/table.go
parent[chore]: Bump github.com/tdewolff/minify/v2 from 2.20.12 to 2.20.14 (#2530) (diff)
downloadgotosocial-6433a505820cfeb43990a3453a0ed8b24e432b7d.tar.xz
[chore] update bun + extras v1.1.16 -> v1.1.17 (#2534)
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema/table.go')
-rw-r--r--vendor/github.com/uptrace/bun/schema/table.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/github.com/uptrace/bun/schema/table.go b/vendor/github.com/uptrace/bun/schema/table.go
index 9eb7d1bfe..e6986f109 100644
--- a/vendor/github.com/uptrace/bun/schema/table.go
+++ b/vendor/github.com/uptrace/bun/schema/table.go
@@ -377,7 +377,6 @@ func (t *Table) newField(f reflect.StructField, prefix string, index []int) *Fie
}
if s, ok := tag.Option("default"); ok {
field.SQLDefault = s
- field.NullZero = true
}
if s, ok := field.Tag.Option("type"); ok {
field.UserSQLType = s
@@ -477,7 +476,7 @@ func (t *Table) belongsToRelation(field *Field) *Relation {
}
rel := &Relation{
- Type: HasOneRelation,
+ Type: BelongsToRelation,
Field: field,
JoinTable: joinTable,
}
@@ -571,7 +570,7 @@ func (t *Table) hasOneRelation(field *Field) *Relation {
joinTable := t.dialect.Tables().Ref(field.IndirectType)
rel := &Relation{
- Type: BelongsToRelation,
+ Type: HasOneRelation,
Field: field,
JoinTable: joinTable,
}