Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Fix for paymail table not being included
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed May 16, 2022
1 parent b5fcc6d commit a9ff9f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions client_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ func WithPaymailSupport(domains []string, defaultFromPaymail, defaultNote string
}

// Add the paymail_address model in bux
c.addModels(modelList, &PaymailAddress{Model: *NewBaseModel(ModelPaymailAddress)})
c.addModels(migrateList, newPaymail(""))
}
}

Expand All @@ -500,7 +500,7 @@ func WithPaymailServerConfig(config *server.Configuration, defaultFromPaymail, d
}

// Add the paymail_address model in bux
c.addModels(modelList, &PaymailAddress{Model: *NewBaseModel(ModelPaymailAddress)})
c.addModels(migrateList, newPaymail(""))
}
}

Expand Down
7 changes: 2 additions & 5 deletions examples/client/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,9 @@ func main() {
TxTimeout: defaultTimeouts,
User: os.Getenv("DB_USER"),
}),
bux.WithPaymailSupport([]string{"test.com"}, "example@test.com", "Example note", false, false),
bux.WithTaskQ(taskmanager.DefaultTaskQConfig("test_queue"), taskmanager.FactoryMemory), // Tasks
bux.WithAutoMigrate( // All models
append(bux.BaseModels, &bux.PaymailAddress{
Model: *bux.NewBaseModel(bux.ModelPaymailAddress), // Add the paymail model (for use in BUX server & clients)
})...,
),
bux.WithAutoMigrate(bux.BaseModels...),
)
if err != nil {
log.Fatalln("error: " + err.Error())
Expand Down

0 comments on commit a9ff9f5

Please sign in to comment.