Skip to content

Commit

Permalink
feat(migrate): change migrate schema with config schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Matrix-X committed Oct 8, 2024
1 parent 033c809 commit 1e74ef6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion internal/model/crm/customerdomain/customer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const CustomerPersonal = "_personal"
const CustomerCompany = "_company"

func (mdl *Customer) TableName() string {
return model.PowerXSchema + "." + model.TableNameCustomer
//return model.PowerXSchema + "." + model.TableNameCustomer
return "public." + model.TableNameCustomer
}

func (mdl *Customer) GetTableName(needFull bool) string {
Expand Down
5 changes: 3 additions & 2 deletions internal/model/organization/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ type User struct {
}

func (mdl *User) TableName() string {
return model.PowerXSchema + "." + model.TableNameCart
//return model.PowerXSchema + "." + model.TableNameUser
return "public." + model.TableNameUser
}

func (mdl *User) GetTableName(needFull bool) string {
tableName := model.TableNameCart
tableName := model.TableNameUser
if needFull {
tableName = mdl.TableName()
}
Expand Down

0 comments on commit 1e74ef6

Please sign in to comment.