Making private some sqlstore methods (#13895)

* Making private some sqlstore methods

* Calling for create indexes on missing stores

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Jesús Espino
2020-03-03 11:45:49 +01:00
коммит произвёл GitHub
родитель aec606500f
Коммит 2a5d30f8f3
33 изменённых файлов: 124 добавлений и 121 удалений

Просмотреть файл

@@ -51,7 +51,7 @@ type SqlGroupStore struct {
SqlStore
}
func NewSqlGroupStore(sqlStore SqlStore) store.GroupStore {
func newSqlGroupStore(sqlStore SqlStore) store.GroupStore {
s := &SqlGroupStore{SqlStore: sqlStore}
for _, db := range sqlStore.GetAllConns() {
groups := db.AddTableWithName(model.Group{}, "UserGroups").SetKeys(false, "Id")
@@ -78,7 +78,7 @@ func NewSqlGroupStore(sqlStore SqlStore) store.GroupStore {
return s
}
func (s *SqlGroupStore) CreateIndexesIfNotExists() {
func (s *SqlGroupStore) createIndexesIfNotExists() {
s.CreateIndexIfNotExists("idx_groupmembers_create_at", "GroupMembers", "CreateAt")
s.CreateIndexIfNotExists("idx_usergroups_remote_id", "UserGroups", "RemoteId")
s.CreateIndexIfNotExists("idx_usergroups_delete_at", "UserGroups", "DeleteAt")