Skip to content

Commit a44f854

Browse files
committed
correct table name for user exports
1 parent df6436d commit a44f854

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

models/user.go

+10
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,16 @@ func (User) TableName() string {
124124
return tableName
125125
}
126126

127+
func (UserForExport) TableName() string {
128+
tableName := "users"
129+
130+
if namespace.GetNamespace() != "" {
131+
return namespace.GetNamespace() + "_" + tableName
132+
}
133+
134+
return tableName
135+
}
136+
127137
func (u *User) BeforeCreate(tx *pop.Connection) error {
128138
return u.BeforeUpdate(tx)
129139
}

0 commit comments

Comments
 (0)