Removing supplier concept from the sql store (#16355)
* Removing supplier concept from the sql store * Removing other metions to supplier * Fixing gofmt * Fixing gofmt * Renaming NewSqlStore to New * Fixing tests Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
11248831b8
Коммит
a74fe05695
@@ -15,20 +15,20 @@ import (
|
||||
)
|
||||
|
||||
type SqlWebhookStore struct {
|
||||
*SqlSupplier
|
||||
*SqlStore
|
||||
metrics einterfaces.MetricsInterface
|
||||
}
|
||||
|
||||
func (s SqlWebhookStore) ClearCaches() {
|
||||
}
|
||||
|
||||
func newSqlWebhookStore(sqlSupplier *SqlSupplier, metrics einterfaces.MetricsInterface) store.WebhookStore {
|
||||
func newSqlWebhookStore(sqlStore *SqlStore, metrics einterfaces.MetricsInterface) store.WebhookStore {
|
||||
s := &SqlWebhookStore{
|
||||
SqlSupplier: sqlSupplier,
|
||||
metrics: metrics,
|
||||
SqlStore: sqlStore,
|
||||
metrics: metrics,
|
||||
}
|
||||
|
||||
for _, db := range sqlSupplier.GetAllConns() {
|
||||
for _, db := range sqlStore.GetAllConns() {
|
||||
table := db.AddTableWithName(model.IncomingWebhook{}, "IncomingWebhooks").SetKeys(false, "Id")
|
||||
table.ColMap("Id").SetMaxSize(26)
|
||||
table.ColMap("UserId").SetMaxSize(26)
|
||||
|
||||
Ссылка в новой задаче
Block a user