mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-16 04:13:12 +00:00
chore: fix linter warning
This commit is contained in:
parent
85f5f03be9
commit
6c54732cd1
@ -14,6 +14,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
storepb "github.com/yourselfhosted/slash/proto/gen/store"
|
||||
"github.com/yourselfhosted/slash/server/common"
|
||||
)
|
||||
@ -109,6 +110,12 @@ func (s *Store) Migrate(ctx context.Context) error {
|
||||
return errors.Wrap(err, "failed to seed")
|
||||
}
|
||||
}
|
||||
|
||||
// Manually migrate workspace settings.
|
||||
// TODO: remove this after the next release.
|
||||
if err := s.migrateWorkspaceSettings(ctx); err != nil {
|
||||
return errors.Wrap(err, "failed to migrate workspace settings")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -291,7 +298,8 @@ func (s *Store) normalizedMigrationHistoryList(ctx context.Context) error {
|
||||
return tx.Commit()
|
||||
}
|
||||
|
||||
func (s *Store) MigrateWorkspaceSettings(ctx context.Context) error {
|
||||
// migrateWorkspaceSettings migrates workspace settings manually.
|
||||
func (s *Store) migrateWorkspaceSettings(ctx context.Context) error {
|
||||
workspaceSettings, err := s.driver.ListWorkspaceSettings(ctx, &FindWorkspaceSetting{})
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user