summaryrefslogtreecommitdiff
path: root/vendor/github.com/uptrace/bun/schema/tables.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-11-13 12:29:08 +0100
committerLibravatar GitHub <noreply@github.com>2021-11-13 12:29:08 +0100
commit829a934d23ab221049b4d54926305d8d5d64c9ad (patch)
treef4e382b289c113d3ba8a3c7a183507a5609c46c0 /vendor/github.com/uptrace/bun/schema/tables.go
parentsmtp + email confirmation (#285) (diff)
downloadgotosocial-829a934d23ab221049b4d54926305d8d5d64c9ad.tar.xz
update dependencies (#296)
Diffstat (limited to 'vendor/github.com/uptrace/bun/schema/tables.go')
-rw-r--r--vendor/github.com/uptrace/bun/schema/tables.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/vendor/github.com/uptrace/bun/schema/tables.go b/vendor/github.com/uptrace/bun/schema/tables.go
index 4be856b34..b6215a14a 100644
--- a/vendor/github.com/uptrace/bun/schema/tables.go
+++ b/vendor/github.com/uptrace/bun/schema/tables.go
@@ -101,13 +101,15 @@ func (t *Tables) table(typ reflect.Type, allowInProgress bool) *Table {
return table
}
- if inProgress.init2() {
- t.mu.Lock()
- delete(t.inProgress, typ)
- t.tables.Store(typ, table)
- t.mu.Unlock()
+ if !inProgress.init2() {
+ return table
}
+ t.mu.Lock()
+ delete(t.inProgress, typ)
+ t.tables.Store(typ, table)
+ t.mu.Unlock()
+
t.dialect.OnTable(table)
for _, field := range table.FieldMap {