diff --git a/server/api/api.go b/server/api/api.go index c7cad8537..238185878 100644 --- a/server/api/api.go +++ b/server/api/api.go @@ -483,7 +483,7 @@ func (a *API) handleGetMe(w http.ResponseWriter, r *http.Request) { defer a.audit.LogRecord(audit.LevelRead, auditRec) if session.UserID == SingleUser { - now := time.Now().Unix() + now := utils.GetMillis() user = &model.User{ ID: SingleUser, Username: SingleUser, diff --git a/server/api/auth.go b/server/api/auth.go index 9b831c59f..7008e6e0f 100644 --- a/server/api/auth.go +++ b/server/api/auth.go @@ -9,12 +9,12 @@ import ( "net" "net/http" "strings" - "time" "github.com/gorilla/mux" "github.com/mattermost/focalboard/server/model" "github.com/mattermost/focalboard/server/services/audit" "github.com/mattermost/focalboard/server/services/auth" + "github.com/mattermost/focalboard/server/utils" "github.com/mattermost/mattermost-server/v6/shared/mlog" ) @@ -386,7 +386,7 @@ func (a *API) attachSession(handler func(w http.ResponseWriter, r *http.Request) return } - now := time.Now().Unix() + now := utils.GetMillis() session := &model.Session{ ID: SingleUser, Token: token, @@ -403,7 +403,7 @@ func (a *API) attachSession(handler func(w http.ResponseWriter, r *http.Request) if a.MattermostAuth && r.Header.Get("Mattermost-User-Id") != "" { userID := r.Header.Get("Mattermost-User-Id") - now := time.Now().Unix() + now := utils.GetMillis() session := &model.Session{ ID: userID, Token: userID, diff --git a/server/app/sharing_test.go b/server/app/sharing_test.go index 114069b65..551ada53e 100644 --- a/server/app/sharing_test.go +++ b/server/app/sharing_test.go @@ -3,7 +3,6 @@ package app import ( "database/sql" "testing" - "time" "github.com/golang/mock/gomock" "github.com/mattermost/focalboard/server/model" @@ -27,7 +26,7 @@ func TestGetSharing(t *testing.T) { Enabled: true, Token: "token", ModifiedBy: "otherid", - UpdateAt: time.Now().Unix(), + UpdateAt: utils.GetMillis(), } th.Store.EXPECT().GetSharing(gomock.Eq(container), gomock.Eq("test-id")).Return(want, nil) @@ -74,7 +73,7 @@ func TestUpsertSharing(t *testing.T) { Enabled: true, Token: "token", ModifiedBy: "otherid", - UpdateAt: time.Now().Unix(), + UpdateAt: utils.GetMillis(), } t.Run("should success to upsert sharing", func(t *testing.T) { diff --git a/server/auth/auth.go b/server/auth/auth.go index 92a24064a..7af6c36f4 100644 --- a/server/auth/auth.go +++ b/server/auth/auth.go @@ -3,11 +3,11 @@ package auth import ( "database/sql" - "time" "github.com/mattermost/focalboard/server/model" "github.com/mattermost/focalboard/server/services/config" "github.com/mattermost/focalboard/server/services/store" + "github.com/mattermost/focalboard/server/utils" "github.com/pkg/errors" ) @@ -38,7 +38,7 @@ func (a *Auth) GetSession(token string) (*model.Session, error) { if err != nil { return nil, errors.Wrap(err, "unable to get the session for the token") } - if session.UpdateAt < (time.Now().Unix() - a.config.SessionRefreshTime) { + if session.UpdateAt < (utils.GetMillis() - utils.SecondsToMillis(a.config.SessionRefreshTime)) { _ = a.store.RefreshSession(session) } return session, nil diff --git a/server/auth/auth_test.go b/server/auth/auth_test.go index 3d57c09c6..0d67c5d5e 100644 --- a/server/auth/auth_test.go +++ b/server/auth/auth_test.go @@ -3,7 +3,6 @@ package auth import ( "database/sql" "testing" - "time" "github.com/golang/mock/gomock" "github.com/mattermost/focalboard/server/model" @@ -25,8 +24,8 @@ var mockSession = &model.Session{ ID: utils.NewID(utils.IDTypeSession), Token: "goodToken", UserID: "12345", - CreateAt: time.Now().Unix() - 2000, - UpdateAt: time.Now().Unix() - 2000, + CreateAt: utils.GetMillis() - utils.SecondsToMillis(2000), + UpdateAt: utils.GetMillis() - utils.SecondsToMillis(2000), } func setupTestHelper(t *testing.T) *TestHelper { diff --git a/server/services/store/mattermostauthlayer/mattermostauthlayer.go b/server/services/store/mattermostauthlayer/mattermostauthlayer.go index a6e7256e1..347fefb7c 100644 --- a/server/services/store/mattermostauthlayer/mattermostauthlayer.go +++ b/server/services/store/mattermostauthlayer/mattermostauthlayer.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "strings" - "time" "github.com/pkg/errors" @@ -13,6 +12,7 @@ import ( "github.com/mattermost/focalboard/server/model" "github.com/mattermost/focalboard/server/services/store" + "github.com/mattermost/focalboard/server/utils" "github.com/mattermost/mattermost-server/v6/shared/mlog" ) @@ -161,7 +161,7 @@ func (s *MattermostAuthLayer) GetActiveUserCount(updatedSecondsAgo int64) (int, query := s.getQueryBuilder(). Select("count(distinct userId)"). From("Sessions"). - Where(sq.Gt{"LastActivityAt": time.Now().Unix() - updatedSecondsAgo}) + Where(sq.Gt{"LastActivityAt": utils.GetMillis() - utils.SecondsToMillis(updatedSecondsAgo)}) row := query.QueryRow() diff --git a/server/services/store/mockstore/mockstore.go b/server/services/store/mockstore/mockstore.go index a7a07254a..050e6027c 100644 --- a/server/services/store/mockstore/mockstore.go +++ b/server/services/store/mockstore/mockstore.go @@ -1,7 +1,7 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: services/store/store.go +// Source: github.com/mattermost/focalboard/server/services/store (interfaces: Store) -// Package mock_store is a generated GoMock package. +// Package mockstore is a generated GoMock package. package mockstore import ( @@ -36,118 +36,118 @@ func (m *MockStore) EXPECT() *MockStoreMockRecorder { } // CleanUpSessions mocks base method. -func (m *MockStore) CleanUpSessions(expireTime int64) error { +func (m *MockStore) CleanUpSessions(arg0 int64) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CleanUpSessions", expireTime) + ret := m.ctrl.Call(m, "CleanUpSessions", arg0) ret0, _ := ret[0].(error) return ret0 } // CleanUpSessions indicates an expected call of CleanUpSessions. -func (mr *MockStoreMockRecorder) CleanUpSessions(expireTime interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) CleanUpSessions(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanUpSessions", reflect.TypeOf((*MockStore)(nil).CleanUpSessions), expireTime) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CleanUpSessions", reflect.TypeOf((*MockStore)(nil).CleanUpSessions), arg0) } // CreateSession mocks base method. -func (m *MockStore) CreateSession(session *model.Session) error { +func (m *MockStore) CreateSession(arg0 *model.Session) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateSession", session) + ret := m.ctrl.Call(m, "CreateSession", arg0) ret0, _ := ret[0].(error) return ret0 } // CreateSession indicates an expected call of CreateSession. -func (mr *MockStoreMockRecorder) CreateSession(session interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) CreateSession(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSession", reflect.TypeOf((*MockStore)(nil).CreateSession), session) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSession", reflect.TypeOf((*MockStore)(nil).CreateSession), arg0) } // CreateUser mocks base method. -func (m *MockStore) CreateUser(user *model.User) error { +func (m *MockStore) CreateUser(arg0 *model.User) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateUser", user) + ret := m.ctrl.Call(m, "CreateUser", arg0) ret0, _ := ret[0].(error) return ret0 } // CreateUser indicates an expected call of CreateUser. -func (mr *MockStoreMockRecorder) CreateUser(user interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) CreateUser(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUser", reflect.TypeOf((*MockStore)(nil).CreateUser), user) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateUser", reflect.TypeOf((*MockStore)(nil).CreateUser), arg0) } // DeleteBlock mocks base method. -func (m *MockStore) DeleteBlock(c store.Container, blockID, modifiedBy string) error { +func (m *MockStore) DeleteBlock(arg0 store.Container, arg1, arg2 string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteBlock", c, blockID, modifiedBy) + ret := m.ctrl.Call(m, "DeleteBlock", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } // DeleteBlock indicates an expected call of DeleteBlock. -func (mr *MockStoreMockRecorder) DeleteBlock(c, blockID, modifiedBy interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) DeleteBlock(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteBlock", reflect.TypeOf((*MockStore)(nil).DeleteBlock), c, blockID, modifiedBy) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteBlock", reflect.TypeOf((*MockStore)(nil).DeleteBlock), arg0, arg1, arg2) } // DeleteSession mocks base method. -func (m *MockStore) DeleteSession(sessionID string) error { +func (m *MockStore) DeleteSession(arg0 string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteSession", sessionID) + ret := m.ctrl.Call(m, "DeleteSession", arg0) ret0, _ := ret[0].(error) return ret0 } // DeleteSession indicates an expected call of DeleteSession. -func (mr *MockStoreMockRecorder) DeleteSession(sessionID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) DeleteSession(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSession", reflect.TypeOf((*MockStore)(nil).DeleteSession), sessionID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSession", reflect.TypeOf((*MockStore)(nil).DeleteSession), arg0) } // GetActiveUserCount mocks base method. -func (m *MockStore) GetActiveUserCount(updatedSecondsAgo int64) (int, error) { +func (m *MockStore) GetActiveUserCount(arg0 int64) (int, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetActiveUserCount", updatedSecondsAgo) + ret := m.ctrl.Call(m, "GetActiveUserCount", arg0) ret0, _ := ret[0].(int) ret1, _ := ret[1].(error) return ret0, ret1 } // GetActiveUserCount indicates an expected call of GetActiveUserCount. -func (mr *MockStoreMockRecorder) GetActiveUserCount(updatedSecondsAgo interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetActiveUserCount(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActiveUserCount", reflect.TypeOf((*MockStore)(nil).GetActiveUserCount), updatedSecondsAgo) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActiveUserCount", reflect.TypeOf((*MockStore)(nil).GetActiveUserCount), arg0) } // GetAllBlocks mocks base method. -func (m *MockStore) GetAllBlocks(c store.Container) ([]model.Block, error) { +func (m *MockStore) GetAllBlocks(arg0 store.Container) ([]model.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAllBlocks", c) + ret := m.ctrl.Call(m, "GetAllBlocks", arg0) ret0, _ := ret[0].([]model.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetAllBlocks indicates an expected call of GetAllBlocks. -func (mr *MockStoreMockRecorder) GetAllBlocks(c interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetAllBlocks(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBlocks", reflect.TypeOf((*MockStore)(nil).GetAllBlocks), c) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllBlocks", reflect.TypeOf((*MockStore)(nil).GetAllBlocks), arg0) } // GetBlock mocks base method. -func (m *MockStore) GetBlock(c store.Container, blockID string) (*model.Block, error) { +func (m *MockStore) GetBlock(arg0 store.Container, arg1 string) (*model.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBlock", c, blockID) + ret := m.ctrl.Call(m, "GetBlock", arg0, arg1) ret0, _ := ret[0].(*model.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetBlock indicates an expected call of GetBlock. -func (mr *MockStoreMockRecorder) GetBlock(c, blockID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetBlock(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockStore)(nil).GetBlock), c, blockID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlock", reflect.TypeOf((*MockStore)(nil).GetBlock), arg0, arg1) } // GetBlockCountsByType mocks base method. @@ -166,78 +166,78 @@ func (mr *MockStoreMockRecorder) GetBlockCountsByType() *gomock.Call { } // GetBlocksWithParent mocks base method. -func (m *MockStore) GetBlocksWithParent(c store.Container, parentID string) ([]model.Block, error) { +func (m *MockStore) GetBlocksWithParent(arg0 store.Container, arg1 string) ([]model.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBlocksWithParent", c, parentID) + ret := m.ctrl.Call(m, "GetBlocksWithParent", arg0, arg1) ret0, _ := ret[0].([]model.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetBlocksWithParent indicates an expected call of GetBlocksWithParent. -func (mr *MockStoreMockRecorder) GetBlocksWithParent(c, parentID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetBlocksWithParent(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksWithParent", reflect.TypeOf((*MockStore)(nil).GetBlocksWithParent), c, parentID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksWithParent", reflect.TypeOf((*MockStore)(nil).GetBlocksWithParent), arg0, arg1) } // GetBlocksWithParentAndType mocks base method. -func (m *MockStore) GetBlocksWithParentAndType(c store.Container, parentID, blockType string) ([]model.Block, error) { +func (m *MockStore) GetBlocksWithParentAndType(arg0 store.Container, arg1, arg2 string) ([]model.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBlocksWithParentAndType", c, parentID, blockType) + ret := m.ctrl.Call(m, "GetBlocksWithParentAndType", arg0, arg1, arg2) ret0, _ := ret[0].([]model.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetBlocksWithParentAndType indicates an expected call of GetBlocksWithParentAndType. -func (mr *MockStoreMockRecorder) GetBlocksWithParentAndType(c, parentID, blockType interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetBlocksWithParentAndType(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksWithParentAndType", reflect.TypeOf((*MockStore)(nil).GetBlocksWithParentAndType), c, parentID, blockType) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksWithParentAndType", reflect.TypeOf((*MockStore)(nil).GetBlocksWithParentAndType), arg0, arg1, arg2) } // GetBlocksWithRootID mocks base method. -func (m *MockStore) GetBlocksWithRootID(c store.Container, rootID string) ([]model.Block, error) { +func (m *MockStore) GetBlocksWithRootID(arg0 store.Container, arg1 string) ([]model.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBlocksWithRootID", c, rootID) + ret := m.ctrl.Call(m, "GetBlocksWithRootID", arg0, arg1) ret0, _ := ret[0].([]model.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetBlocksWithRootID indicates an expected call of GetBlocksWithRootID. -func (mr *MockStoreMockRecorder) GetBlocksWithRootID(c, rootID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetBlocksWithRootID(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksWithRootID", reflect.TypeOf((*MockStore)(nil).GetBlocksWithRootID), c, rootID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksWithRootID", reflect.TypeOf((*MockStore)(nil).GetBlocksWithRootID), arg0, arg1) } // GetBlocksWithType mocks base method. -func (m *MockStore) GetBlocksWithType(c store.Container, blockType string) ([]model.Block, error) { +func (m *MockStore) GetBlocksWithType(arg0 store.Container, arg1 string) ([]model.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetBlocksWithType", c, blockType) + ret := m.ctrl.Call(m, "GetBlocksWithType", arg0, arg1) ret0, _ := ret[0].([]model.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetBlocksWithType indicates an expected call of GetBlocksWithType. -func (mr *MockStoreMockRecorder) GetBlocksWithType(c, blockType interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetBlocksWithType(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksWithType", reflect.TypeOf((*MockStore)(nil).GetBlocksWithType), c, blockType) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetBlocksWithType", reflect.TypeOf((*MockStore)(nil).GetBlocksWithType), arg0, arg1) } // GetParentID mocks base method. -func (m *MockStore) GetParentID(c store.Container, blockID string) (string, error) { +func (m *MockStore) GetParentID(arg0 store.Container, arg1 string) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetParentID", c, blockID) + ret := m.ctrl.Call(m, "GetParentID", arg0, arg1) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // GetParentID indicates an expected call of GetParentID. -func (mr *MockStoreMockRecorder) GetParentID(c, blockID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetParentID(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParentID", reflect.TypeOf((*MockStore)(nil).GetParentID), c, blockID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParentID", reflect.TypeOf((*MockStore)(nil).GetParentID), arg0, arg1) } // GetRegisteredUserCount mocks base method. @@ -256,78 +256,78 @@ func (mr *MockStoreMockRecorder) GetRegisteredUserCount() *gomock.Call { } // GetRootID mocks base method. -func (m *MockStore) GetRootID(c store.Container, blockID string) (string, error) { +func (m *MockStore) GetRootID(arg0 store.Container, arg1 string) (string, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetRootID", c, blockID) + ret := m.ctrl.Call(m, "GetRootID", arg0, arg1) ret0, _ := ret[0].(string) ret1, _ := ret[1].(error) return ret0, ret1 } // GetRootID indicates an expected call of GetRootID. -func (mr *MockStoreMockRecorder) GetRootID(c, blockID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetRootID(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRootID", reflect.TypeOf((*MockStore)(nil).GetRootID), c, blockID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRootID", reflect.TypeOf((*MockStore)(nil).GetRootID), arg0, arg1) } // GetSession mocks base method. -func (m *MockStore) GetSession(token string, expireTime int64) (*model.Session, error) { +func (m *MockStore) GetSession(arg0 string, arg1 int64) (*model.Session, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSession", token, expireTime) + ret := m.ctrl.Call(m, "GetSession", arg0, arg1) ret0, _ := ret[0].(*model.Session) ret1, _ := ret[1].(error) return ret0, ret1 } // GetSession indicates an expected call of GetSession. -func (mr *MockStoreMockRecorder) GetSession(token, expireTime interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetSession(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSession", reflect.TypeOf((*MockStore)(nil).GetSession), token, expireTime) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSession", reflect.TypeOf((*MockStore)(nil).GetSession), arg0, arg1) } // GetSharing mocks base method. -func (m *MockStore) GetSharing(c store.Container, rootID string) (*model.Sharing, error) { +func (m *MockStore) GetSharing(arg0 store.Container, arg1 string) (*model.Sharing, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSharing", c, rootID) + ret := m.ctrl.Call(m, "GetSharing", arg0, arg1) ret0, _ := ret[0].(*model.Sharing) ret1, _ := ret[1].(error) return ret0, ret1 } // GetSharing indicates an expected call of GetSharing. -func (mr *MockStoreMockRecorder) GetSharing(c, rootID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetSharing(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSharing", reflect.TypeOf((*MockStore)(nil).GetSharing), c, rootID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSharing", reflect.TypeOf((*MockStore)(nil).GetSharing), arg0, arg1) } // GetSubTree2 mocks base method. -func (m *MockStore) GetSubTree2(c store.Container, blockID string) ([]model.Block, error) { +func (m *MockStore) GetSubTree2(arg0 store.Container, arg1 string) ([]model.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSubTree2", c, blockID) + ret := m.ctrl.Call(m, "GetSubTree2", arg0, arg1) ret0, _ := ret[0].([]model.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetSubTree2 indicates an expected call of GetSubTree2. -func (mr *MockStoreMockRecorder) GetSubTree2(c, blockID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetSubTree2(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubTree2", reflect.TypeOf((*MockStore)(nil).GetSubTree2), c, blockID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubTree2", reflect.TypeOf((*MockStore)(nil).GetSubTree2), arg0, arg1) } // GetSubTree3 mocks base method. -func (m *MockStore) GetSubTree3(c store.Container, blockID string) ([]model.Block, error) { +func (m *MockStore) GetSubTree3(arg0 store.Container, arg1 string) ([]model.Block, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetSubTree3", c, blockID) + ret := m.ctrl.Call(m, "GetSubTree3", arg0, arg1) ret0, _ := ret[0].([]model.Block) ret1, _ := ret[1].(error) return ret0, ret1 } // GetSubTree3 indicates an expected call of GetSubTree3. -func (mr *MockStoreMockRecorder) GetSubTree3(c, blockID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetSubTree3(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubTree3", reflect.TypeOf((*MockStore)(nil).GetSubTree3), c, blockID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubTree3", reflect.TypeOf((*MockStore)(nil).GetSubTree3), arg0, arg1) } // GetSystemSettings mocks base method. @@ -346,93 +346,93 @@ func (mr *MockStoreMockRecorder) GetSystemSettings() *gomock.Call { } // GetUserByEmail mocks base method. -func (m *MockStore) GetUserByEmail(email string) (*model.User, error) { +func (m *MockStore) GetUserByEmail(arg0 string) (*model.User, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetUserByEmail", email) + ret := m.ctrl.Call(m, "GetUserByEmail", arg0) ret0, _ := ret[0].(*model.User) ret1, _ := ret[1].(error) return ret0, ret1 } // GetUserByEmail indicates an expected call of GetUserByEmail. -func (mr *MockStoreMockRecorder) GetUserByEmail(email interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetUserByEmail(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByEmail", reflect.TypeOf((*MockStore)(nil).GetUserByEmail), email) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByEmail", reflect.TypeOf((*MockStore)(nil).GetUserByEmail), arg0) } // GetUserByID mocks base method. -func (m *MockStore) GetUserByID(userID string) (*model.User, error) { +func (m *MockStore) GetUserByID(arg0 string) (*model.User, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetUserByID", userID) + ret := m.ctrl.Call(m, "GetUserByID", arg0) ret0, _ := ret[0].(*model.User) ret1, _ := ret[1].(error) return ret0, ret1 } // GetUserByID indicates an expected call of GetUserByID. -func (mr *MockStoreMockRecorder) GetUserByID(userID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetUserByID(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByID", reflect.TypeOf((*MockStore)(nil).GetUserByID), userID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByID", reflect.TypeOf((*MockStore)(nil).GetUserByID), arg0) } // GetUserByUsername mocks base method. -func (m *MockStore) GetUserByUsername(username string) (*model.User, error) { +func (m *MockStore) GetUserByUsername(arg0 string) (*model.User, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetUserByUsername", username) + ret := m.ctrl.Call(m, "GetUserByUsername", arg0) ret0, _ := ret[0].(*model.User) ret1, _ := ret[1].(error) return ret0, ret1 } // GetUserByUsername indicates an expected call of GetUserByUsername. -func (mr *MockStoreMockRecorder) GetUserByUsername(username interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetUserByUsername(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByUsername", reflect.TypeOf((*MockStore)(nil).GetUserByUsername), username) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByUsername", reflect.TypeOf((*MockStore)(nil).GetUserByUsername), arg0) } // GetUserWorkspaces mocks base method. -func (m *MockStore) GetUserWorkspaces(userID string) ([]model.UserWorkspace, error) { +func (m *MockStore) GetUserWorkspaces(arg0 string) ([]model.UserWorkspace, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetUserWorkspaces", userID) + ret := m.ctrl.Call(m, "GetUserWorkspaces", arg0) ret0, _ := ret[0].([]model.UserWorkspace) ret1, _ := ret[1].(error) return ret0, ret1 } // GetUserWorkspaces indicates an expected call of GetUserWorkspaces. -func (mr *MockStoreMockRecorder) GetUserWorkspaces(userID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetUserWorkspaces(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserWorkspaces", reflect.TypeOf((*MockStore)(nil).GetUserWorkspaces), userID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserWorkspaces", reflect.TypeOf((*MockStore)(nil).GetUserWorkspaces), arg0) } // GetUsersByWorkspace mocks base method. -func (m *MockStore) GetUsersByWorkspace(workspaceID string) ([]*model.User, error) { +func (m *MockStore) GetUsersByWorkspace(arg0 string) ([]*model.User, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetUsersByWorkspace", workspaceID) + ret := m.ctrl.Call(m, "GetUsersByWorkspace", arg0) ret0, _ := ret[0].([]*model.User) ret1, _ := ret[1].(error) return ret0, ret1 } // GetUsersByWorkspace indicates an expected call of GetUsersByWorkspace. -func (mr *MockStoreMockRecorder) GetUsersByWorkspace(workspaceID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetUsersByWorkspace(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUsersByWorkspace", reflect.TypeOf((*MockStore)(nil).GetUsersByWorkspace), workspaceID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUsersByWorkspace", reflect.TypeOf((*MockStore)(nil).GetUsersByWorkspace), arg0) } // GetWorkspace mocks base method. -func (m *MockStore) GetWorkspace(ID string) (*model.Workspace, error) { +func (m *MockStore) GetWorkspace(arg0 string) (*model.Workspace, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetWorkspace", ID) + ret := m.ctrl.Call(m, "GetWorkspace", arg0) ret0, _ := ret[0].(*model.Workspace) ret1, _ := ret[1].(error) return ret0, ret1 } // GetWorkspace indicates an expected call of GetWorkspace. -func (mr *MockStoreMockRecorder) GetWorkspace(ID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) GetWorkspace(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkspace", reflect.TypeOf((*MockStore)(nil).GetWorkspace), ID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetWorkspace", reflect.TypeOf((*MockStore)(nil).GetWorkspace), arg0) } // GetWorkspaceCount mocks base method. @@ -451,74 +451,74 @@ func (mr *MockStoreMockRecorder) GetWorkspaceCount() *gomock.Call { } // HasWorkspaceAccess mocks base method. -func (m *MockStore) HasWorkspaceAccess(userID, workspaceID string) (bool, error) { +func (m *MockStore) HasWorkspaceAccess(arg0, arg1 string) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "HasWorkspaceAccess", userID, workspaceID) + ret := m.ctrl.Call(m, "HasWorkspaceAccess", arg0, arg1) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // HasWorkspaceAccess indicates an expected call of HasWorkspaceAccess. -func (mr *MockStoreMockRecorder) HasWorkspaceAccess(userID, workspaceID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) HasWorkspaceAccess(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasWorkspaceAccess", reflect.TypeOf((*MockStore)(nil).HasWorkspaceAccess), userID, workspaceID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasWorkspaceAccess", reflect.TypeOf((*MockStore)(nil).HasWorkspaceAccess), arg0, arg1) } // InsertBlock mocks base method. -func (m *MockStore) InsertBlock(c store.Container, block *model.Block, userID string) error { +func (m *MockStore) InsertBlock(arg0 store.Container, arg1 *model.Block, arg2 string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InsertBlock", c, block, userID) + ret := m.ctrl.Call(m, "InsertBlock", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } // InsertBlock indicates an expected call of InsertBlock. -func (mr *MockStoreMockRecorder) InsertBlock(c, block, userID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) InsertBlock(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertBlock", reflect.TypeOf((*MockStore)(nil).InsertBlock), c, block, userID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InsertBlock", reflect.TypeOf((*MockStore)(nil).InsertBlock), arg0, arg1, arg2) } // PatchBlock mocks base method. -func (m *MockStore) PatchBlock(c store.Container, blockID string, blockPatch *model.BlockPatch, userID string) error { +func (m *MockStore) PatchBlock(arg0 store.Container, arg1 string, arg2 *model.BlockPatch, arg3 string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "PatchBlock", c, blockID, blockPatch, userID) + ret := m.ctrl.Call(m, "PatchBlock", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) return ret0 } // PatchBlock indicates an expected call of PatchBlock. -func (mr *MockStoreMockRecorder) PatchBlock(c, blockID, blockPatch, userID interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) PatchBlock(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PatchBlock", reflect.TypeOf((*MockStore)(nil).PatchBlock), c, blockID, blockPatch, userID) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PatchBlock", reflect.TypeOf((*MockStore)(nil).PatchBlock), arg0, arg1, arg2, arg3) } // RefreshSession mocks base method. -func (m *MockStore) RefreshSession(session *model.Session) error { +func (m *MockStore) RefreshSession(arg0 *model.Session) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RefreshSession", session) + ret := m.ctrl.Call(m, "RefreshSession", arg0) ret0, _ := ret[0].(error) return ret0 } // RefreshSession indicates an expected call of RefreshSession. -func (mr *MockStoreMockRecorder) RefreshSession(session interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) RefreshSession(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshSession", reflect.TypeOf((*MockStore)(nil).RefreshSession), session) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshSession", reflect.TypeOf((*MockStore)(nil).RefreshSession), arg0) } // SetSystemSetting mocks base method. -func (m *MockStore) SetSystemSetting(key, value string) error { +func (m *MockStore) SetSystemSetting(arg0, arg1 string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetSystemSetting", key, value) + ret := m.ctrl.Call(m, "SetSystemSetting", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // SetSystemSetting indicates an expected call of SetSystemSetting. -func (mr *MockStoreMockRecorder) SetSystemSetting(key, value interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) SetSystemSetting(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSystemSetting", reflect.TypeOf((*MockStore)(nil).SetSystemSetting), key, value) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSystemSetting", reflect.TypeOf((*MockStore)(nil).SetSystemSetting), arg0, arg1) } // Shutdown mocks base method. @@ -536,99 +536,99 @@ func (mr *MockStoreMockRecorder) Shutdown() *gomock.Call { } // UpdateSession mocks base method. -func (m *MockStore) UpdateSession(session *model.Session) error { +func (m *MockStore) UpdateSession(arg0 *model.Session) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateSession", session) + ret := m.ctrl.Call(m, "UpdateSession", arg0) ret0, _ := ret[0].(error) return ret0 } // UpdateSession indicates an expected call of UpdateSession. -func (mr *MockStoreMockRecorder) UpdateSession(session interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) UpdateSession(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSession", reflect.TypeOf((*MockStore)(nil).UpdateSession), session) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSession", reflect.TypeOf((*MockStore)(nil).UpdateSession), arg0) } // UpdateUser mocks base method. -func (m *MockStore) UpdateUser(user *model.User) error { +func (m *MockStore) UpdateUser(arg0 *model.User) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateUser", user) + ret := m.ctrl.Call(m, "UpdateUser", arg0) ret0, _ := ret[0].(error) return ret0 } // UpdateUser indicates an expected call of UpdateUser. -func (mr *MockStoreMockRecorder) UpdateUser(user interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) UpdateUser(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUser", reflect.TypeOf((*MockStore)(nil).UpdateUser), user) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUser", reflect.TypeOf((*MockStore)(nil).UpdateUser), arg0) } // UpdateUserPassword mocks base method. -func (m *MockStore) UpdateUserPassword(username, password string) error { +func (m *MockStore) UpdateUserPassword(arg0, arg1 string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateUserPassword", username, password) + ret := m.ctrl.Call(m, "UpdateUserPassword", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // UpdateUserPassword indicates an expected call of UpdateUserPassword. -func (mr *MockStoreMockRecorder) UpdateUserPassword(username, password interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) UpdateUserPassword(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUserPassword", reflect.TypeOf((*MockStore)(nil).UpdateUserPassword), username, password) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUserPassword", reflect.TypeOf((*MockStore)(nil).UpdateUserPassword), arg0, arg1) } // UpdateUserPasswordByID mocks base method. -func (m *MockStore) UpdateUserPasswordByID(userID, password string) error { +func (m *MockStore) UpdateUserPasswordByID(arg0, arg1 string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpdateUserPasswordByID", userID, password) + ret := m.ctrl.Call(m, "UpdateUserPasswordByID", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // UpdateUserPasswordByID indicates an expected call of UpdateUserPasswordByID. -func (mr *MockStoreMockRecorder) UpdateUserPasswordByID(userID, password interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) UpdateUserPasswordByID(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUserPasswordByID", reflect.TypeOf((*MockStore)(nil).UpdateUserPasswordByID), userID, password) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUserPasswordByID", reflect.TypeOf((*MockStore)(nil).UpdateUserPasswordByID), arg0, arg1) } // UpsertSharing mocks base method. -func (m *MockStore) UpsertSharing(c store.Container, sharing model.Sharing) error { +func (m *MockStore) UpsertSharing(arg0 store.Container, arg1 model.Sharing) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpsertSharing", c, sharing) + ret := m.ctrl.Call(m, "UpsertSharing", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // UpsertSharing indicates an expected call of UpsertSharing. -func (mr *MockStoreMockRecorder) UpsertSharing(c, sharing interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) UpsertSharing(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertSharing", reflect.TypeOf((*MockStore)(nil).UpsertSharing), c, sharing) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertSharing", reflect.TypeOf((*MockStore)(nil).UpsertSharing), arg0, arg1) } // UpsertWorkspaceSettings mocks base method. -func (m *MockStore) UpsertWorkspaceSettings(workspace model.Workspace) error { +func (m *MockStore) UpsertWorkspaceSettings(arg0 model.Workspace) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpsertWorkspaceSettings", workspace) + ret := m.ctrl.Call(m, "UpsertWorkspaceSettings", arg0) ret0, _ := ret[0].(error) return ret0 } // UpsertWorkspaceSettings indicates an expected call of UpsertWorkspaceSettings. -func (mr *MockStoreMockRecorder) UpsertWorkspaceSettings(workspace interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) UpsertWorkspaceSettings(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertWorkspaceSettings", reflect.TypeOf((*MockStore)(nil).UpsertWorkspaceSettings), workspace) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertWorkspaceSettings", reflect.TypeOf((*MockStore)(nil).UpsertWorkspaceSettings), arg0) } // UpsertWorkspaceSignupToken mocks base method. -func (m *MockStore) UpsertWorkspaceSignupToken(workspace model.Workspace) error { +func (m *MockStore) UpsertWorkspaceSignupToken(arg0 model.Workspace) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpsertWorkspaceSignupToken", workspace) + ret := m.ctrl.Call(m, "UpsertWorkspaceSignupToken", arg0) ret0, _ := ret[0].(error) return ret0 } // UpsertWorkspaceSignupToken indicates an expected call of UpsertWorkspaceSignupToken. -func (mr *MockStoreMockRecorder) UpsertWorkspaceSignupToken(workspace interface{}) *gomock.Call { +func (mr *MockStoreMockRecorder) UpsertWorkspaceSignupToken(arg0 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertWorkspaceSignupToken", reflect.TypeOf((*MockStore)(nil).UpsertWorkspaceSignupToken), workspace) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertWorkspaceSignupToken", reflect.TypeOf((*MockStore)(nil).UpsertWorkspaceSignupToken), arg0) } diff --git a/server/services/store/sqlstore/blocks.go b/server/services/store/sqlstore/blocks.go index 58402bec4..c05fdbe5f 100644 --- a/server/services/store/sqlstore/blocks.go +++ b/server/services/store/sqlstore/blocks.go @@ -5,7 +5,6 @@ import ( "database/sql" "encoding/json" "fmt" - "time" "github.com/mattermost/focalboard/server/utils" @@ -429,7 +428,7 @@ func (s *SQLStore) DeleteBlock(c store.Container, blockID string, modifiedBy str return err } - now := time.Now().Unix() + now := utils.GetMillis() insertQuery := s.getQueryBuilder().Insert(s.tablePrefix+"blocks_history"). Columns( "workspace_id", diff --git a/server/services/store/sqlstore/initializations/bindata.go b/server/services/store/sqlstore/initializations/bindata.go index 6c4a8e5c2..4b48ba0ac 100644 --- a/server/services/store/sqlstore/initializations/bindata.go +++ b/server/services/store/sqlstore/initializations/bindata.go @@ -1,6 +1,8 @@ -// Code generated for package initializations by go-bindata DO NOT EDIT. (@generated) +// Code generated by go-bindata. // sources: // templates/templates.json +// DO NOT EDIT! + package initializations import ( @@ -47,32 +49,21 @@ type bindataFileInfo struct { modTime time.Time } -// Name return file name func (fi bindataFileInfo) Name() string { return fi.name } - -// Size return file size func (fi bindataFileInfo) Size() int64 { return fi.size } - -// Mode return file mode func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } - -// Mode return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } - -// IsDir return file whether a directory func (fi bindataFileInfo) IsDir() bool { - return fi.mode&os.ModeDir != 0 + return false } - -// Sys return file is sys mode func (fi bindataFileInfo) Sys() interface{} { return nil } @@ -92,7 +83,7 @@ func templatesJson() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates.json", size: 22926, mode: os.FileMode(436), modTime: time.Unix(1612440372, 0)} + info := bindataFileInfo{name: "templates.json", size: 22926, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} a := &asset{bytes: bytes, info: info} return a, nil } @@ -191,7 +182,6 @@ type bintree struct { Func func() (*asset, error) Children map[string]*bintree } - var _bintree = &bintree{nil, map[string]*bintree{ "templates.json": &bintree{templatesJson, map[string]*bintree{}}, }} @@ -242,3 +232,4 @@ func _filePath(dir, name string) string { cannonicalName := strings.Replace(name, "\\", "/", -1) return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) } + diff --git a/server/services/store/sqlstore/migrations/bindata.go b/server/services/store/sqlstore/migrations/bindata.go index e6d1fa9a6..9af70dc2c 100644 --- a/server/services/store/sqlstore/migrations/bindata.go +++ b/server/services/store/sqlstore/migrations/bindata.go @@ -1,3 +1,33 @@ +// Code generated by go-bindata. +// sources: +// migrations_files/000001_init.down.sql +// migrations_files/000001_init.up.sql +// migrations_files/000002_system_settings_table.down.sql +// migrations_files/000002_system_settings_table.up.sql +// migrations_files/000003_blocks_rootid.down.sql +// migrations_files/000003_blocks_rootid.up.sql +// migrations_files/000004_auth_table.down.sql +// migrations_files/000004_auth_table.up.sql +// migrations_files/000005_blocks_modifiedby.down.sql +// migrations_files/000005_blocks_modifiedby.up.sql +// migrations_files/000006_sharing_table.down.sql +// migrations_files/000006_sharing_table.up.sql +// migrations_files/000007_workspaces_table.down.sql +// migrations_files/000007_workspaces_table.up.sql +// migrations_files/000008_teams.down.sql +// migrations_files/000008_teams.up.sql +// migrations_files/000009_blocks_history.down.sql +// migrations_files/000009_blocks_history.up.sql +// migrations_files/000010_blocks_created_by.down.sql +// migrations_files/000010_blocks_created_by.up.sql +// migrations_files/000011_match_collation.down.sql +// migrations_files/000011_match_collation.up.sql +// migrations_files/000012_match_column_collation.down.sql +// migrations_files/000012_match_column_collation.up.sql +// migrations_files/000013_millisecond_timestamps.down.sql +// migrations_files/000013_millisecond_timestamps.up.sql +// DO NOT EDIT! + package migrations import ( @@ -5,10 +35,14 @@ import ( "compress/gzip" "fmt" "io" + "io/ioutil" + "os" + "path/filepath" "strings" + "time" ) -func bindata_read(data []byte, name string) ([]byte, error) { +func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { return nil, fmt.Errorf("Read %q: %v", name, err) @@ -16,242 +50,610 @@ func bindata_read(data []byte, name string) ([]byte, error) { var buf bytes.Buffer _, err = io.Copy(&buf, gz) - gz.Close() + clErr := gz.Close() if err != nil { return nil, fmt.Errorf("Read %q: %v", name, err) } + if clErr != nil { + return nil, err + } return buf.Bytes(), nil } -var __000001_init_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xb6\xe6\x02\x04\x00\x00\xff\xff\x2d\x73\xd0\xe1\x1e\x00\x00\x00") +type asset struct { + bytes []byte + info os.FileInfo +} -func _000001_init_down_sql() ([]byte, error) { - return bindata_read( - __000001_init_down_sql, +type bindataFileInfo struct { + name string + size int64 + mode os.FileMode + modTime time.Time +} + +func (fi bindataFileInfo) Name() string { + return fi.name +} +func (fi bindataFileInfo) Size() int64 { + return fi.size +} +func (fi bindataFileInfo) Mode() os.FileMode { + return fi.mode +} +func (fi bindataFileInfo) ModTime() time.Time { + return fi.modTime +} +func (fi bindataFileInfo) IsDir() bool { + return false +} +func (fi bindataFileInfo) Sys() interface{} { + return nil +} + +var __000001_initDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xb6\xe6\x02\x04\x00\x00\xff\xff\x2d\x73\xd0\xe1\x1e\x00\x00\x00") + +func _000001_initDownSqlBytes() ([]byte, error) { + return bindataRead( + __000001_initDownSql, "000001_init.down.sql", ) } -var __000001_init_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\xd0\x5d\x6f\xb2\x30\x14\x07\xf0\x6b\xf8\x14\xe7\x86\x00\x09\x7a\xf3\x3c\x31\x8b\xbb\xaa\x5a\x27\x1b\x2f\x06\xea\xd4\xdd\x28\x4a\xd9\x9a\x81\x22\xad\xc9\x4c\xd3\xef\xbe\xe0\xd0\x38\x75\x77\x3d\xa7\xcd\xaf\xe7\xfc\xfb\x11\x46\x04\x03\x41\x3d\x0f\x83\x3b\x84\x20\x24\x80\x67\x6e\x4c\x62\x90\xb2\x5d\x56\x34\x63\x5f\x4a\xad\xf2\xed\xfa\x93\x83\xa5\x6b\x2c\x85\x57\x14\xf5\x47\x28\xb2\xfe\x75\x6c\x47\xd7\xa4\x64\x19\xb4\xcb\x2d\x17\xef\x15\xe5\x4a\xb1\x0d\xa7\x95\x58\x24\x02\x88\xeb\xe3\x98\x20\x7f\x4c\xde\x8e\x6c\x30\xf1\x3c\x18\xe0\x21\x9a\x78\x04\x82\x70\x6a\xd9\x8e\x94\x74\x93\x2a\x75\x52\xf8\x2e\x67\x82\x5e\x1a\x03\x44\x70\xed\xdc\x00\x56\x4c\xa2\x61\x7d\x63\x99\xc6\xbc\x65\x14\x2d\x23\x05\x63\xd4\x35\xfc\xae\x91\x99\x0e\x98\x41\x38\x35\xed\x9b\x0f\x8a\x03\xdf\xe5\xf7\x7c\xab\x63\xdf\x9f\xb1\x73\x61\x94\x49\x45\x37\x62\xf1\x47\x04\x8d\xbd\xe4\xeb\x0f\x5a\x24\x4b\x29\x69\xce\xa9\x52\x3f\x65\x63\x40\xcf\x7d\x72\x03\xe2\xe8\x9a\x38\x94\x14\x08\x9e\x1d\xcf\x4c\xe4\xe7\x22\x63\x34\x4f\x39\x5c\xc7\xfa\x1c\x87\xc1\x89\xac\x5f\x36\xa0\xa3\x6b\xeb\x8a\x26\x82\xd6\xcb\x9c\xf1\x7d\x99\x5e\xb7\x52\x9a\xd3\xab\xd6\x38\x72\x7d\x14\xcd\xe1\x05\xcf\xc1\x62\xa9\x03\xe7\x58\x6c\xdd\x86\x5f\x4b\x9d\x12\xa9\x97\x46\x7d\x82\x23\x88\x31\x81\xbd\xc8\x1e\x8a\xd5\xff\x66\x94\x47\xfd\x3b\x00\x00\xff\xff\x60\xc4\xab\x56\x4c\x02\x00\x00") +func _000001_initDownSql() (*asset, error) { + bytes, err := _000001_initDownSqlBytes() + if err != nil { + return nil, err + } -func _000001_init_up_sql() ([]byte, error) { - return bindata_read( - __000001_init_up_sql, + info := bindataFileInfo{name: "000001_init.down.sql", size: 30, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000001_initUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x74\xd0\x5d\x6f\xb2\x30\x14\x07\xf0\x6b\xf8\x14\xe7\x86\x00\x09\x7a\xf3\x3c\x31\x8b\xbb\xaa\x5a\x27\x1b\x2f\x06\xea\xd4\xdd\x28\x4a\xd9\x9a\x81\x22\xad\xc9\x4c\xd3\xef\xbe\xe0\xd0\x38\x75\x77\x3d\xa7\xcd\xaf\xe7\xfc\xfb\x11\x46\x04\x03\x41\x3d\x0f\x83\x3b\x84\x20\x24\x80\x67\x6e\x4c\x62\x90\xb2\x5d\x56\x34\x63\x5f\x4a\xad\xf2\xed\xfa\x93\x83\xa5\x6b\x2c\x85\x57\x14\xf5\x47\x28\xb2\xfe\x75\x6c\x47\xd7\xa4\x64\x19\xb4\xcb\x2d\x17\xef\x15\xe5\x4a\xb1\x0d\xa7\x95\x58\x24\x02\x88\xeb\xe3\x98\x20\x7f\x4c\xde\x8e\x6c\x30\xf1\x3c\x18\xe0\x21\x9a\x78\x04\x82\x70\x6a\xd9\x8e\x94\x74\x93\x2a\x75\x52\xf8\x2e\x67\x82\x5e\x1a\x03\x44\x70\xed\xdc\x00\x56\x4c\xa2\x61\x7d\x63\x99\xc6\xbc\x65\x14\x2d\x23\x05\x63\xd4\x35\xfc\xae\x91\x99\x0e\x98\x41\x38\x35\xed\x9b\x0f\x8a\x03\xdf\xe5\xf7\x7c\xab\x63\xdf\x9f\xb1\x73\x61\x94\x49\x45\x37\x62\xf1\x47\x04\x8d\xbd\xe4\xeb\x0f\x5a\x24\x4b\x29\x69\xce\xa9\x52\x3f\x65\x63\x40\xcf\x7d\x72\x03\xe2\xe8\x9a\x38\x94\x14\x08\x9e\x1d\xcf\x4c\xe4\xe7\x22\x63\x34\x4f\x39\x5c\xc7\xfa\x1c\x87\xc1\x89\xac\x5f\x36\xa0\xa3\x6b\xeb\x8a\x26\x82\xd6\xcb\x9c\xf1\x7d\x99\x5e\xb7\x52\x9a\xd3\xab\xd6\x38\x72\x7d\x14\xcd\xe1\x05\xcf\xc1\x62\xa9\x03\xe7\x58\x6c\xdd\x86\x5f\x4b\x9d\x12\xa9\x97\x46\x7d\x82\x23\x88\x31\x81\xbd\xc8\x1e\x8a\xd5\xff\x66\x94\x47\xfd\x3b\x00\x00\xff\xff\x60\xc4\xab\x56\x4c\x02\x00\x00") + +func _000001_initUpSqlBytes() ([]byte, error) { + return bindataRead( + __000001_initUpSql, "000001_init.up.sql", ) } -var __000002_system_settings_table_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\xae\x2c\x2e\x49\xcd\x8d\x2f\x4e\x2d\x29\xc9\xcc\x4b\x2f\xb6\xe6\x02\x04\x00\x00\xff\xff\xd2\x63\x5d\x39\x27\x00\x00\x00") +func _000001_initUpSql() (*asset, error) { + bytes, err := _000001_initUpSqlBytes() + if err != nil { + return nil, err + } -func _000002_system_settings_table_down_sql() ([]byte, error) { - return bindata_read( - __000002_system_settings_table_down_sql, + info := bindataFileInfo{name: "000001_init.up.sql", size: 588, mode: os.FileMode(436), modTime: time.Unix(1631562120, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000002_system_settings_tableDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\xae\x2c\x2e\x49\xcd\x8d\x2f\x4e\x2d\x29\xc9\xcc\x4b\x2f\xb6\xe6\x02\x04\x00\x00\xff\xff\xd2\x63\x5d\x39\x27\x00\x00\x00") + +func _000002_system_settings_tableDownSqlBytes() ([]byte, error) { + return bindataRead( + __000002_system_settings_tableDownSql, "000002_system_settings_table.down.sql", ) } -var __000002_system_settings_table_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x14\xcc\xc1\x6a\x83\x30\x18\x07\xf0\xb3\x79\x8a\xff\x51\x41\xc4\xc1\x0e\x83\x9d\x32\xf7\xc9\x64\x6e\x2d\xf1\x6b\xd1\x53\x69\x31\x96\x80\x4a\xdb\xc4\x52\x09\x79\xf7\xd2\x17\xf8\x15\x8a\x24\x13\x58\x7e\xd5\x84\xaa\xc4\xff\x86\x41\x6d\xd5\x70\x03\xef\xb3\xcb\x4d\x0f\xe6\x11\x82\x5d\xad\xd3\xd3\xc1\x6a\xe7\xcc\x7c\xb6\x88\x45\x64\x7a\xec\xa5\x2a\x7e\xa4\x8a\xdf\xf2\x3c\x49\x45\x74\x3f\x8e\x8b\x06\x53\xcb\xa9\x88\xb6\xaa\xfa\x93\xaa\xc3\x2f\x75\x88\x4d\x9f\x88\x04\xde\x9b\x01\xd9\xb4\xda\xeb\x18\xc2\x37\x95\x72\x57\x33\x5e\x80\x2c\x98\x14\x1a\x62\x2c\x6e\xf8\x98\x4e\xef\xde\xeb\xb9\x0f\xe1\x53\x3c\x03\x00\x00\xff\xff\x3e\xa0\x26\x35\x9e\x00\x00\x00") +func _000002_system_settings_tableDownSql() (*asset, error) { + bytes, err := _000002_system_settings_tableDownSqlBytes() + if err != nil { + return nil, err + } -func _000002_system_settings_table_up_sql() ([]byte, error) { - return bindata_read( - __000002_system_settings_table_up_sql, + info := bindataFileInfo{name: "000002_system_settings_table.down.sql", size: 39, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000002_system_settings_tableUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x14\xcc\xc1\x6a\x83\x30\x18\x07\xf0\xb3\x79\x8a\xff\x51\x41\xc4\xc1\x0e\x83\x9d\x32\xf7\xc9\x64\x6e\x2d\xf1\x6b\xd1\x53\x69\x31\x96\x80\x4a\xdb\xc4\x52\x09\x79\xf7\xd2\x17\xf8\x15\x8a\x24\x13\x58\x7e\xd5\x84\xaa\xc4\xff\x86\x41\x6d\xd5\x70\x03\xef\xb3\xcb\x4d\x0f\xe6\x11\x82\x5d\xad\xd3\xd3\xc1\x6a\xe7\xcc\x7c\xb6\x88\x45\x64\x7a\xec\xa5\x2a\x7e\xa4\x8a\xdf\xf2\x3c\x49\x45\x74\x3f\x8e\x8b\x06\x53\xcb\xa9\x88\xb6\xaa\xfa\x93\xaa\xc3\x2f\x75\x88\x4d\x9f\x88\x04\xde\x9b\x01\xd9\xb4\xda\xeb\x18\xc2\x37\x95\x72\x57\x33\x5e\x80\x2c\x98\x14\x1a\x62\x2c\x6e\xf8\x98\x4e\xef\xde\xeb\xb9\x0f\xe1\x53\x3c\x03\x00\x00\xff\xff\x3e\xa0\x26\x35\x9e\x00\x00\x00") + +func _000002_system_settings_tableUpSqlBytes() ([]byte, error) { + return bindataRead( + __000002_system_settings_tableUpSql, "000002_system_settings_table.up.sql", ) } -var __000003_blocks_rootid_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x09\xf2\x0f\x50\x70\xf6\xf7\x09\xf5\xf5\x53\x28\xca\xcf\x2f\x89\xcf\x4c\xb1\xe6\x02\x04\x00\x00\xff\xff\x51\xe5\xe2\x3a\x33\x00\x00\x00") +func _000002_system_settings_tableUpSql() (*asset, error) { + bytes, err := _000002_system_settings_tableUpSqlBytes() + if err != nil { + return nil, err + } -func _000003_blocks_rootid_down_sql() ([]byte, error) { - return bindata_read( - __000003_blocks_rootid_down_sql, + info := bindataFileInfo{name: "000002_system_settings_table.up.sql", size: 158, mode: os.FileMode(436), modTime: time.Unix(1631562120, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000003_blocks_rootidDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x09\xf2\x0f\x50\x70\xf6\xf7\x09\xf5\xf5\x53\x28\xca\xcf\x2f\x89\xcf\x4c\xb1\xe6\x02\x04\x00\x00\xff\xff\x51\xe5\xe2\x3a\x33\x00\x00\x00") + +func _000003_blocks_rootidDownSqlBytes() ([]byte, error) { + return bindataRead( + __000003_blocks_rootidDownSql, "000003_blocks_rootid.down.sql", ) } -var __000003_blocks_rootid_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x74\x71\x51\x70\xf6\xf7\x09\xf5\xf5\x53\x28\xca\xcf\x2f\x89\xcf\x4c\x51\x08\x73\x0c\x72\xf6\x70\x0c\xd2\x30\x36\xd3\xb4\xe6\x02\x04\x00\x00\xff\xff\xc2\x68\x66\x83\x3e\x00\x00\x00") +func _000003_blocks_rootidDownSql() (*asset, error) { + bytes, err := _000003_blocks_rootidDownSqlBytes() + if err != nil { + return nil, err + } -func _000003_blocks_rootid_up_sql() ([]byte, error) { - return bindata_read( - __000003_blocks_rootid_up_sql, + info := bindataFileInfo{name: "000003_blocks_rootid.down.sql", size: 51, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000003_blocks_rootidUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x74\x71\x51\x70\xf6\xf7\x09\xf5\xf5\x53\x28\xca\xcf\x2f\x89\xcf\x4c\x51\x08\x73\x0c\x72\xf6\x70\x0c\xd2\x30\x36\xd3\xb4\xe6\x02\x04\x00\x00\xff\xff\xc2\x68\x66\x83\x3e\x00\x00\x00") + +func _000003_blocks_rootidUpSqlBytes() ([]byte, error) { + return bindataRead( + __000003_blocks_rootidUpSql, "000003_blocks_rootid.up.sql", ) } -var __000004_auth_table_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\x2d\x4e\x2d\x2a\xb6\xe6\xc2\x2e\x59\x9c\x5a\x5c\x9c\x99\x9f\x57\x6c\xcd\x05\x08\x00\x00\xff\xff\xb6\xc1\x44\xa1\x3d\x00\x00\x00") +func _000003_blocks_rootidUpSql() (*asset, error) { + bytes, err := _000003_blocks_rootidUpSqlBytes() + if err != nil { + return nil, err + } -func _000004_auth_table_down_sql() ([]byte, error) { - return bindata_read( - __000004_auth_table_down_sql, + info := bindataFileInfo{name: "000003_blocks_rootid.up.sql", size: 62, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000004_auth_tableDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\x2d\x4e\x2d\x2a\xb6\xe6\xc2\x2e\x59\x9c\x5a\x5c\x9c\x99\x9f\x57\x6c\xcd\x05\x08\x00\x00\xff\xff\xb6\xc1\x44\xa1\x3d\x00\x00\x00") + +func _000004_auth_tableDownSqlBytes() ([]byte, error) { + return bindataRead( + __000004_auth_tableDownSql, "000004_auth_table.down.sql", ) } -var __000004_auth_table_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x91\x4d\x4f\x32\x31\x14\x85\xd7\xcc\xaf\xb8\x4b\x48\x08\xe1\x25\x2f\x89\x89\xab\x82\x45\x47\x11\x4c\xa7\x1a\x58\x4d\x2a\xbd\xa3\x8d\xf3\x65\x6f\xf1\x23\x4d\xff\xbb\x99\x48\x24\x61\x30\x71\xa1\x5d\x3e\xa7\xed\xb9\xf7\x9c\xa9\xe0\x4c\x72\x90\x6c\x32\xe7\x10\xcf\x60\xb1\x94\xc0\x57\x71\x22\x13\xf0\x7e\x50\x5b\xcc\xcc\x5b\x08\x5b\x42\x4b\xd0\x8d\x3a\x46\xc3\x1d\x13\xd3\x0b\x26\xba\xff\x86\xc3\x5e\x3f\xea\x34\x52\xa9\x0a\x3c\xe4\x58\x28\x93\x7f\xc1\xd1\x78\xdc\xc0\x5a\x11\xbd\x56\xb6\xf5\x49\x91\xa9\x94\x70\x63\xd1\x1d\x2a\x6a\xeb\x1e\x53\x42\xfb\x62\x36\x7b\x8b\xd1\x5e\xd2\xca\xa9\x96\x8b\xad\x6a\x82\xcf\xe3\xbd\xc9\x60\x50\x57\xe4\x1e\x2c\x52\x08\x97\xc9\x72\xe1\x3d\xe6\x84\x21\x48\xbe\x92\xde\x63\xa9\x43\xe8\x47\x9d\x8d\x45\xe5\x30\x55\xae\x79\x36\x89\xcf\xe3\x85\x6c\xd6\xab\xf5\x11\xaa\x31\xc7\x36\xbd\x11\xf1\x35\x13\x6b\xb8\xe2\x6b\xe8\x1a\xdd\x8b\x7a\x3b\xfb\xe2\x9d\x9e\xf3\x10\xce\xf8\x8c\xdd\xce\x25\x34\xb3\xb2\xa9\xe4\x02\x12\x2e\x61\xeb\xb2\x93\xe2\xfe\xff\x6e\x90\xd3\x28\xfa\x59\x25\x84\x44\xa6\x2a\xbf\x69\xc5\x55\x4f\x58\x1e\xab\x2a\x6d\xdf\xfd\xfb\xb8\x7e\x27\x98\x8f\x00\x00\x00\xff\xff\x43\xa6\x60\x6a\xab\x02\x00\x00") +func _000004_auth_tableDownSql() (*asset, error) { + bytes, err := _000004_auth_tableDownSqlBytes() + if err != nil { + return nil, err + } -func _000004_auth_table_up_sql() ([]byte, error) { - return bindata_read( - __000004_auth_table_up_sql, + info := bindataFileInfo{name: "000004_auth_table.down.sql", size: 61, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000004_auth_tableUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x91\x4d\x4f\x32\x31\x14\x85\xd7\xcc\xaf\xb8\x4b\x48\x08\xe1\x25\x2f\x89\x89\xab\x82\x45\x47\x11\x4c\xa7\x1a\x58\x4d\x2a\xbd\xa3\x8d\xf3\x65\x6f\xf1\x23\x4d\xff\xbb\x99\x48\x24\x61\x30\x71\xa1\x5d\x3e\xa7\xed\xb9\xf7\x9c\xa9\xe0\x4c\x72\x90\x6c\x32\xe7\x10\xcf\x60\xb1\x94\xc0\x57\x71\x22\x13\xf0\x7e\x50\x5b\xcc\xcc\x5b\x08\x5b\x42\x4b\xd0\x8d\x3a\x46\xc3\x1d\x13\xd3\x0b\x26\xba\xff\x86\xc3\x5e\x3f\xea\x34\x52\xa9\x0a\x3c\xe4\x58\x28\x93\x7f\xc1\xd1\x78\xdc\xc0\x5a\x11\xbd\x56\xb6\xf5\x49\x91\xa9\x94\x70\x63\xd1\x1d\x2a\x6a\xeb\x1e\x53\x42\xfb\x62\x36\x7b\x8b\xd1\x5e\xd2\xca\xa9\x96\x8b\xad\x6a\x82\xcf\xe3\xbd\xc9\x60\x50\x57\xe4\x1e\x2c\x52\x08\x97\xc9\x72\xe1\x3d\xe6\x84\x21\x48\xbe\x92\xde\x63\xa9\x43\xe8\x47\x9d\x8d\x45\xe5\x30\x55\xae\x79\x36\x89\xcf\xe3\x85\x6c\xd6\xab\xf5\x11\xaa\x31\xc7\x36\xbd\x11\xf1\x35\x13\x6b\xb8\xe2\x6b\xe8\x1a\xdd\x8b\x7a\x3b\xfb\xe2\x9d\x9e\xf3\x10\xce\xf8\x8c\xdd\xce\x25\x34\xb3\xb2\xa9\xe4\x02\x12\x2e\x61\xeb\xb2\x93\xe2\xfe\xff\x6e\x90\xd3\x28\xfa\x59\x25\x84\x44\xa6\x2a\xbf\x69\xc5\x55\x4f\x58\x1e\xab\x2a\x6d\xdf\xfd\xfb\xb8\x7e\x27\x98\x8f\x00\x00\x00\xff\xff\x43\xa6\x60\x6a\xab\x02\x00\x00") + +func _000004_auth_tableUpSqlBytes() ([]byte, error) { + return bindataRead( + __000004_auth_tableUpSql, "000004_auth_table.up.sql", ) } -var __000005_blocks_modifiedby_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x09\xf2\x0f\x50\x70\xf6\xf7\x09\xf5\xf5\x53\xc8\xcd\x4f\xc9\x4c\xcb\x4c\x4d\x89\x4f\xaa\xb4\xe6\x02\x04\x00\x00\xff\xff\x6a\xfe\x38\x0a\x37\x00\x00\x00") +func _000004_auth_tableUpSql() (*asset, error) { + bytes, err := _000004_auth_tableUpSqlBytes() + if err != nil { + return nil, err + } -func _000005_blocks_modifiedby_down_sql() ([]byte, error) { - return bindata_read( - __000005_blocks_modifiedby_down_sql, + info := bindataFileInfo{name: "000004_auth_table.up.sql", size: 683, mode: os.FileMode(436), modTime: time.Unix(1631562120, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000005_blocks_modifiedbyDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x09\xf2\x0f\x50\x70\xf6\xf7\x09\xf5\xf5\x53\xc8\xcd\x4f\xc9\x4c\xcb\x4c\x4d\x89\x4f\xaa\xb4\xe6\x02\x04\x00\x00\xff\xff\x6a\xfe\x38\x0a\x37\x00\x00\x00") + +func _000005_blocks_modifiedbyDownSqlBytes() ([]byte, error) { + return bindataRead( + __000005_blocks_modifiedbyDownSql, "000005_blocks_modifiedby.down.sql", ) } -var __000005_blocks_modifiedby_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x74\x71\x51\x70\xf6\xf7\x09\xf5\xf5\x53\xc8\xcd\x4f\xc9\x4c\xcb\x4c\x4d\x89\x4f\xaa\x54\x08\x73\x0c\x72\xf6\x70\x0c\xd2\x30\x36\xd3\xb4\xe6\x02\x04\x00\x00\xff\xff\x30\x55\xd2\xd8\x42\x00\x00\x00") +func _000005_blocks_modifiedbyDownSql() (*asset, error) { + bytes, err := _000005_blocks_modifiedbyDownSqlBytes() + if err != nil { + return nil, err + } -func _000005_blocks_modifiedby_up_sql() ([]byte, error) { - return bindata_read( - __000005_blocks_modifiedby_up_sql, + info := bindataFileInfo{name: "000005_blocks_modifiedby.down.sql", size: 55, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000005_blocks_modifiedbyUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x74\x71\x51\x70\xf6\xf7\x09\xf5\xf5\x53\xc8\xcd\x4f\xc9\x4c\xcb\x4c\x4d\x89\x4f\xaa\x54\x08\x73\x0c\x72\xf6\x70\x0c\xd2\x30\x36\xd3\xb4\xe6\x02\x04\x00\x00\xff\xff\x30\x55\xd2\xd8\x42\x00\x00\x00") + +func _000005_blocks_modifiedbyUpSqlBytes() ([]byte, error) { + return bindataRead( + __000005_blocks_modifiedbyUpSql, "000005_blocks_modifiedby.up.sql", ) } -var __000006_sharing_table_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\xce\x48\x2c\xca\xcc\x4b\xb7\xe6\x02\x04\x00\x00\xff\xff\x7a\x74\xe5\xab\x1f\x00\x00\x00") +func _000005_blocks_modifiedbyUpSql() (*asset, error) { + bytes, err := _000005_blocks_modifiedbyUpSqlBytes() + if err != nil { + return nil, err + } -func _000006_sharing_table_down_sql() ([]byte, error) { - return bindata_read( - __000006_sharing_table_down_sql, + info := bindataFileInfo{name: "000005_blocks_modifiedby.up.sql", size: 66, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000006_sharing_tableDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\xce\x48\x2c\xca\xcc\x4b\xb7\xe6\x02\x04\x00\x00\xff\xff\x7a\x74\xe5\xab\x1f\x00\x00\x00") + +func _000006_sharing_tableDownSqlBytes() ([]byte, error) { + return bindataRead( + __000006_sharing_tableDownSql, "000006_sharing_table.down.sql", ) } -var __000006_sharing_table_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\xcc\x41\x4b\xc3\x30\x18\x06\xe0\x73\xf3\x2b\xde\x63\x0b\x65\x4c\x14\x11\x3c\xa5\xf5\x9b\x06\x6b\x2b\xe9\xa7\xb8\xd3\x68\x49\xaa\xc1\xb5\x9b\x5b\x06\x8e\x90\xff\x2e\xbd\x78\xd8\xfd\xe1\x29\x35\x49\x26\xb0\x2c\x2a\x82\x5a\xa1\x6e\x18\xf4\xa1\x5a\x6e\x11\xc2\x62\x7f\xb0\x83\xfb\x8d\xf1\xf8\xd5\x1d\xdc\xf4\x89\x54\x24\xce\xe0\x5d\xea\xf2\x49\xea\xf4\xfa\x36\xcb\x45\x62\xa7\xae\xdf\x5a\x83\xa2\x69\x2a\x92\x75\x2e\x12\xbf\xfb\xb6\xd3\xbf\xba\x5a\x2e\x67\x36\xee\x8c\x1b\x9c\x35\x9b\xfe\x7c\x11\x9c\xf6\xa6\xf3\x76\xd3\x79\x14\xea\x51\xd5\x9c\x8b\xe4\x55\xab\x17\xa9\xd7\x78\xa6\x35\x52\x67\x32\x91\x21\x04\x37\x60\x31\x9e\x8f\x3f\xdb\x18\x1f\x68\x25\xdf\x2a\xc6\xbc\xc8\x92\x49\xa3\x25\xc6\xc9\x0f\x77\x63\x7f\x13\x82\x9d\x4c\x8c\xf7\xe2\x2f\x00\x00\xff\xff\x82\xbb\xda\xde\xdc\x00\x00\x00") +func _000006_sharing_tableDownSql() (*asset, error) { + bytes, err := _000006_sharing_tableDownSqlBytes() + if err != nil { + return nil, err + } -func _000006_sharing_table_up_sql() ([]byte, error) { - return bindata_read( - __000006_sharing_table_up_sql, + info := bindataFileInfo{name: "000006_sharing_table.down.sql", size: 31, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000006_sharing_tableUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\xcc\x41\x4b\xc3\x30\x18\x06\xe0\x73\xf3\x2b\xde\x63\x0b\x65\x4c\x14\x11\x3c\xa5\xf5\x9b\x06\x6b\x2b\xe9\xa7\xb8\xd3\x68\x49\xaa\xc1\xb5\x9b\x5b\x06\x8e\x90\xff\x2e\xbd\x78\xd8\xfd\xe1\x29\x35\x49\x26\xb0\x2c\x2a\x82\x5a\xa1\x6e\x18\xf4\xa1\x5a\x6e\x11\xc2\x62\x7f\xb0\x83\xfb\x8d\xf1\xf8\xd5\x1d\xdc\xf4\x89\x54\x24\xce\xe0\x5d\xea\xf2\x49\xea\xf4\xfa\x36\xcb\x45\x62\xa7\xae\xdf\x5a\x83\xa2\x69\x2a\x92\x75\x2e\x12\xbf\xfb\xb6\xd3\xbf\xba\x5a\x2e\x67\x36\xee\x8c\x1b\x9c\x35\x9b\xfe\x7c\x11\x9c\xf6\xa6\xf3\x76\xd3\x79\x14\xea\x51\xd5\x9c\x8b\xe4\x55\xab\x17\xa9\xd7\x78\xa6\x35\x52\x67\x32\x91\x21\x04\x37\x60\x31\x9e\x8f\x3f\xdb\x18\x1f\x68\x25\xdf\x2a\xc6\xbc\xc8\x92\x49\xa3\x25\xc6\xc9\x0f\x77\x63\x7f\x13\x82\x9d\x4c\x8c\xf7\xe2\x2f\x00\x00\xff\xff\x82\xbb\xda\xde\xdc\x00\x00\x00") + +func _000006_sharing_tableUpSqlBytes() ([]byte, error) { + return bindataRead( + __000006_sharing_tableUpSql, "000006_sharing_table.up.sql", ) } -var __000007_workspaces_table_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\xcf\x2f\xca\x2e\x2e\x48\x4c\x4e\x2d\xb6\xe6\x02\x04\x00\x00\xff\xff\x1a\xe4\xe6\x36\x22\x00\x00\x00") +func _000006_sharing_tableUpSql() (*asset, error) { + bytes, err := _000006_sharing_tableUpSqlBytes() + if err != nil { + return nil, err + } -func _000007_workspaces_table_down_sql() ([]byte, error) { - return bindata_read( - __000007_workspaces_table_down_sql, + info := bindataFileInfo{name: "000006_sharing_table.up.sql", size: 220, mode: os.FileMode(436), modTime: time.Unix(1631562120, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000007_workspaces_tableDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\xcf\x2f\xca\x2e\x2e\x48\x4c\x4e\x2d\xb6\xe6\x02\x04\x00\x00\xff\xff\x1a\xe4\xe6\x36\x22\x00\x00\x00") + +func _000007_workspaces_tableDownSqlBytes() ([]byte, error) { + return bindataRead( + __000007_workspaces_tableDownSql, "000007_workspaces_table.down.sql", ) } -var __000007_workspaces_table_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\xcd\x41\x4b\xc3\x30\x18\xc6\xf1\x73\xf3\x29\xde\xe3\x0a\x65\x4c\x14\x11\x3c\x65\x35\xd3\x6a\xed\x24\xcd\x64\x3b\x95\xce\xbc\x2d\x61\x6b\x1b\x9b\x14\x1d\xe1\xfd\xee\x32\x19\x1e\x3c\x3f\x0f\xff\x5f\x2a\x05\x57\x02\x14\x5f\xe6\x02\xb2\x15\x14\x6b\x05\x62\x9b\x95\xaa\x84\x10\xe6\x76\xc4\xc6\x7c\x13\x7d\x0d\xe3\xc1\xd9\xfa\x03\x1d\xcc\x58\x64\x34\xbc\x73\x99\x3e\x71\x39\xbb\xbe\x8d\x13\x16\x39\xd3\xf6\x93\xad\xfc\x70\xc0\xfe\x6f\xba\x5a\x2c\xe2\xdf\x5c\xb1\xc9\xf3\xf3\x09\xbd\x37\x7d\xeb\x20\x04\xd3\xc0\xdc\x0e\xce\xb7\x23\x3a\xa2\xe7\x72\x5d\x84\x80\x47\x87\x44\x4a\x6c\x55\x08\xd8\x6b\xa2\x84\x45\xdd\xa0\x4d\x63\x50\x57\xfb\xd3\x3f\x71\xb2\xba\xf6\x58\xd5\x1e\x96\xd9\x63\x56\xa8\x84\x45\x6f\x32\x7b\xe5\x72\x07\x2f\x62\x07\x33\xa3\x63\x16\x5f\xa4\xee\xe4\x3e\x8f\x44\x0f\x62\xc5\x37\xb9\x82\x73\x85\xa7\x4a\x48\x28\x85\x82\xc9\x37\x77\xdd\xfe\xe6\x62\xde\xb3\x9f\x00\x00\x00\xff\xff\x29\x38\x4d\xc3\x10\x01\x00\x00") +func _000007_workspaces_tableDownSql() (*asset, error) { + bytes, err := _000007_workspaces_tableDownSqlBytes() + if err != nil { + return nil, err + } -func _000007_workspaces_table_up_sql() ([]byte, error) { - return bindata_read( - __000007_workspaces_table_up_sql, + info := bindataFileInfo{name: "000007_workspaces_table.down.sql", size: 34, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000007_workspaces_tableUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x5c\xcd\x41\x4b\xc3\x30\x18\xc6\xf1\x73\xf3\x29\xde\xe3\x0a\x65\x4c\x14\x11\x3c\x65\x35\xd3\x6a\xed\x24\xcd\x64\x3b\x95\xce\xbc\x2d\x61\x6b\x1b\x9b\x14\x1d\xe1\xfd\xee\x32\x19\x1e\x3c\x3f\x0f\xff\x5f\x2a\x05\x57\x02\x14\x5f\xe6\x02\xb2\x15\x14\x6b\x05\x62\x9b\x95\xaa\x84\x10\xe6\x76\xc4\xc6\x7c\x13\x7d\x0d\xe3\xc1\xd9\xfa\x03\x1d\xcc\x58\x64\x34\xbc\x73\x99\x3e\x71\x39\xbb\xbe\x8d\x13\x16\x39\xd3\xf6\x93\xad\xfc\x70\xc0\xfe\x6f\xba\x5a\x2c\xe2\xdf\x5c\xb1\xc9\xf3\xf3\x09\xbd\x37\x7d\xeb\x20\x04\xd3\xc0\xdc\x0e\xce\xb7\x23\x3a\xa2\xe7\x72\x5d\x84\x80\x47\x87\x44\x4a\x6c\x55\x08\xd8\x6b\xa2\x84\x45\xdd\xa0\x4d\x63\x50\x57\xfb\xd3\x3f\x71\xb2\xba\xf6\x58\xd5\x1e\x96\xd9\x63\x56\xa8\x84\x45\x6f\x32\x7b\xe5\x72\x07\x2f\x62\x07\x33\xa3\x63\x16\x5f\xa4\xee\xe4\x3e\x8f\x44\x0f\x62\xc5\x37\xb9\x82\x73\x85\xa7\x4a\x48\x28\x85\x82\xc9\x37\x77\xdd\xfe\xe6\x62\xde\xb3\x9f\x00\x00\x00\xff\xff\x29\x38\x4d\xc3\x10\x01\x00\x00") + +func _000007_workspaces_tableUpSqlBytes() ([]byte, error) { + return bindataRead( + __000007_workspaces_tableUpSql, "000007_workspaces_table.up.sql", ) } -var __000008_teams_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x09\xf2\x0f\x50\x70\xf6\xf7\x09\xf5\xf5\x53\x28\xcf\x2f\xca\x2e\x2e\x48\x4c\x4e\x8d\xcf\x4c\xb1\xe6\xe2\xc2\xa1\xb1\x38\x23\xb1\x28\x33\x2f\x9d\x1c\x9d\xa9\xc5\xc5\x99\xf9\x79\xa8\x96\x26\x96\x96\x64\xc4\x17\xa7\x16\x95\x65\x26\xa7\x5a\x73\x01\x02\x00\x00\xff\xff\x24\x48\xc4\xb6\xad\x00\x00\x00") +func _000007_workspaces_tableUpSql() (*asset, error) { + bytes, err := _000007_workspaces_tableUpSqlBytes() + if err != nil { + return nil, err + } -func _000008_teams_down_sql() ([]byte, error) { - return bindata_read( - __000008_teams_down_sql, + info := bindataFileInfo{name: "000007_workspaces_table.up.sql", size: 272, mode: os.FileMode(436), modTime: time.Unix(1631562120, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000008_teamsDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x09\xf2\x0f\x50\x70\xf6\xf7\x09\xf5\xf5\x53\x28\xcf\x2f\xca\x2e\x2e\x48\x4c\x4e\x8d\xcf\x4c\xb1\xe6\xe2\xc2\xa1\xb1\x38\x23\xb1\x28\x33\x2f\x9d\x1c\x9d\xa9\xc5\xc5\x99\xf9\x79\xa8\x96\x26\x96\x96\x64\xc4\x17\xa7\x16\x95\x65\x26\xa7\x5a\x73\x01\x02\x00\x00\xff\xff\x24\x48\xc4\xb6\xad\x00\x00\x00") + +func _000008_teamsDownSqlBytes() ([]byte, error) { + return bindataRead( + __000008_teamsDownSql, "000008_teams.down.sql", ) } -var __000008_teams_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x74\x71\x51\x70\xf6\xf7\x09\xf5\xf5\x53\x28\xcf\x2f\xca\x2e\x2e\x48\x4c\x4e\x8d\xcf\x4c\x51\x08\x73\x0c\x72\xf6\x70\x0c\xd2\x30\x36\xd3\xb4\xe6\xe2\xc2\x61\x46\x71\x46\x62\x51\x66\x5e\x3a\x85\x86\xa4\x16\x17\x67\xe6\xe7\xa1\x38\x25\xb1\xb4\x24\x23\xbe\x38\xb5\xa8\x2c\x33\x39\x15\x6e\x8a\x91\x01\xc8\x94\xd0\x00\x17\xc7\x10\x2c\x3e\x51\x08\x76\x0d\x41\xb5\xdd\x56\x41\xdd\x40\x5d\x21\xdc\xc3\x35\xc8\x15\x43\x42\x5d\xc1\x3f\x08\x55\xd0\x33\x58\xc1\x2f\xd4\xc7\xc7\x9a\x0b\x10\x00\x00\xff\xff\xab\x8d\x48\xa9\x30\x01\x00\x00") +func _000008_teamsDownSql() (*asset, error) { + bytes, err := _000008_teamsDownSqlBytes() + if err != nil { + return nil, err + } -func _000008_teams_up_sql() ([]byte, error) { - return bindata_read( - __000008_teams_up_sql, + info := bindataFileInfo{name: "000008_teams.down.sql", size: 173, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000008_teamsUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\xf4\x09\x71\x0d\x52\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xe6\x72\x74\x71\x51\x70\xf6\xf7\x09\xf5\xf5\x53\x28\xcf\x2f\xca\x2e\x2e\x48\x4c\x4e\x8d\xcf\x4c\x51\x08\x73\x0c\x72\xf6\x70\x0c\xd2\x30\x36\xd3\xb4\xe6\xe2\xc2\x61\x46\x71\x46\x62\x51\x66\x5e\x3a\x85\x86\xa4\x16\x17\x67\xe6\xe7\xa1\x38\x25\xb1\xb4\x24\x23\xbe\x38\xb5\xa8\x2c\x33\x39\x15\x6e\x8a\x91\x01\xc8\x94\xd0\x00\x17\xc7\x10\x2c\x3e\x51\x08\x76\x0d\x41\xb5\xdd\x56\x41\xdd\x40\x5d\x21\xdc\xc3\x35\xc8\x15\x43\x42\x5d\xc1\x3f\x08\x55\xd0\x33\x58\xc1\x2f\xd4\xc7\xc7\x9a\x0b\x10\x00\x00\xff\xff\xab\x8d\x48\xa9\x30\x01\x00\x00") + +func _000008_teamsUpSqlBytes() ([]byte, error) { + return bindataRead( + __000008_teamsUpSql, "000008_teams.up.sql", ) } -var __000009_blocks_history_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xb6\xe6\x72\xf4\x09\x71\x0d\xc2\x25\x1d\x9f\x91\x59\x5c\x92\x5f\x54\xa9\x10\xe4\xea\xe7\xe8\xeb\xaa\x10\xe2\x8f\xcd\x08\x40\x00\x00\x00\xff\xff\x38\xe5\xec\x7a\x61\x00\x00\x00") +func _000008_teamsUpSql() (*asset, error) { + bytes, err := _000008_teamsUpSqlBytes() + if err != nil { + return nil, err + } -func _000009_blocks_history_down_sql() ([]byte, error) { - return bindata_read( - __000009_blocks_history_down_sql, + info := bindataFileInfo{name: "000008_teams.up.sql", size: 304, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000009_blocks_historyDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x72\x09\xf2\x0f\x50\x08\x71\x74\xf2\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x4d\xca\xc9\x4f\xce\x2e\xb6\xe6\x72\xf4\x09\x71\x0d\xc2\x25\x1d\x9f\x91\x59\x5c\x92\x5f\x54\xa9\x10\xe4\xea\xe7\xe8\xeb\xaa\x10\xe2\x8f\xcd\x08\x40\x00\x00\x00\xff\xff\x38\xe5\xec\x7a\x61\x00\x00\x00") + +func _000009_blocks_historyDownSqlBytes() ([]byte, error) { + return bindataRead( + __000009_blocks_historyDownSql, "000009_blocks_history.down.sql", ) } -var __000009_blocks_history_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x93\xd1\x6f\xda\x30\x10\xc6\x9f\xc9\x5f\x71\x2f\x11\xc9\x94\x56\x93\x36\xa1\xa9\x48\x93\x42\x38\xc0\x5b\x62\x57\x8e\xbb\x96\xbd\x50\x20\xce\xb0\x1a\x48\x1a\xa7\xea\x50\x94\xff\x7d\x4a\x47\x28\x0d\xa0\x3d\x4c\x7d\xc3\x3e\xdf\xef\xbe\xfb\xf8\xe2\xfa\x02\x39\x08\x77\xe0\x23\x94\xe5\x65\x96\xcb\x58\xfd\xae\xaa\x45\x92\x2e\x1f\x34\x70\xa4\x6e\x80\x20\xd8\x71\x6d\xb6\x52\xba\x48\xf3\x6d\xdf\xf0\x38\xba\x02\x77\x0c\x32\x02\xca\x04\xe0\x1d\x09\x45\x78\x82\x68\x19\x1d\x15\xc1\x0f\x97\x7b\x13\x97\x5b\x9f\x7a\xb6\x63\x74\xca\x52\xc5\x70\x99\xa5\xba\xf8\x95\x4b\x5d\x55\x6a\xa3\x65\x5e\xcc\xe6\x05\x08\x12\x60\x28\xdc\xe0\x5a\xfc\x7c\xc1\xd2\x1b\xdf\x87\x21\x8e\xdc\x1b\x5f\x00\x65\xb7\x96\xed\x94\xa5\xdc\x44\x55\xd5\x50\xf4\x63\xa2\x0a\x79\xc8\x18\xba\x02\x6b\xce\x11\xc0\x0a\x05\x1f\xd5\x15\xab\x6b\x4e\x2f\xcc\xf5\x85\x19\x81\x39\xb9\x32\x83\x2b\x33\xee\x3a\xd0\xa5\xec\xb6\x6b\x1f\x0d\x58\x6f\xf5\x63\x72\x8a\x6f\xf5\xec\xd3\x1a\x7b\x07\x8c\x6c\x9e\xcb\x4d\x31\x3b\x63\xc1\x8e\x7d\xaf\x97\x2b\xb9\x9e\xdf\x97\xa5\x4c\xb4\xac\xaa\xbf\xc7\x1d\x03\x06\x64\x4c\xa8\x70\x8c\x4e\xb1\xcd\x24\x08\xbc\x7b\xf9\xad\x8a\x64\x7f\x88\x95\x4c\x22\x0d\x6d\x5b\xbf\x85\x8c\x36\xc8\xfa\xe5\x0e\xe8\x18\x9d\x65\x2e\xe7\x85\xac\x97\xd9\xc3\x9f\xb2\xa8\x7d\x15\xc9\x44\xb6\xae\xf2\x34\x3d\xb1\xcc\x3a\x8d\x54\xac\x64\x34\x5b\x6c\x5b\x95\xe7\x34\x7f\xd0\xd9\x7c\x29\x8f\x9b\xae\x39\x09\x5c\x3e\x85\xef\x38\x05\xeb\xf0\x9d\xa3\x22\xdb\xb0\xe1\x8d\x43\x8d\xbd\x75\xbf\xeb\xd5\x09\x0e\x51\xc0\x53\x11\x7f\x59\x2f\x3e\xef\xf6\xea\x1b\xc6\x9b\x1e\x83\xd0\x10\xb9\x00\x32\xa6\x8c\x23\x10\x7a\x2a\xd5\x60\x85\xe8\xa3\x27\xe0\x03\x8c\x38\x0b\xce\xc7\x1e\x18\x1f\x22\x87\xc1\x14\x0e\x92\x80\xa1\x67\xf7\x8d\xe6\xcf\x6e\xfb\xbf\x17\xf0\x4e\x93\x81\x51\xf0\x18\x1d\xf9\xc4\x13\x30\x64\x75\x18\x27\x84\x8e\xdb\x82\x9a\x2f\xa4\x91\xc3\xf8\x3f\x2c\xf9\x4f\x5d\xaf\xf3\x87\xe8\xa3\xc0\x33\x18\x78\x5e\xc9\x5c\xc2\x6b\xc8\xbe\xc2\xc7\xbe\xf1\x27\x00\x00\xff\xff\xd3\x97\xb4\x77\x9f\x04\x00\x00") +func _000009_blocks_historyDownSql() (*asset, error) { + bytes, err := _000009_blocks_historyDownSqlBytes() + if err != nil { + return nil, err + } -func _000009_blocks_history_up_sql() ([]byte, error) { - return bindata_read( - __000009_blocks_history_up_sql, + info := bindataFileInfo{name: "000009_blocks_history.down.sql", size: 97, mode: os.FileMode(436), modTime: time.Unix(1621275260, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000009_blocks_historyUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x93\xd1\x6f\xda\x30\x10\xc6\x9f\xc9\x5f\x71\x2f\x11\xc9\x94\x56\x93\x36\xa1\xa9\x48\x93\x42\x38\xc0\x5b\x62\x57\x8e\xbb\x96\xbd\x50\x20\xce\xb0\x1a\x48\x1a\xa7\xea\x50\x94\xff\x7d\x4a\x47\x28\x0d\xa0\x3d\x4c\x7d\xc3\x3e\xdf\xef\xbe\xfb\xf8\xe2\xfa\x02\x39\x08\x77\xe0\x23\x94\xe5\x65\x96\xcb\x58\xfd\xae\xaa\x45\x92\x2e\x1f\x34\x70\xa4\x6e\x80\x20\xd8\x71\x6d\xb6\x52\xba\x48\xf3\x6d\xdf\xf0\x38\xba\x02\x77\x0c\x32\x02\xca\x04\xe0\x1d\x09\x45\x78\x82\x68\x19\x1d\x15\xc1\x0f\x97\x7b\x13\x97\x5b\x9f\x7a\xb6\x63\x74\xca\x52\xc5\x70\x99\xa5\xba\xf8\x95\x4b\x5d\x55\x6a\xa3\x65\x5e\xcc\xe6\x05\x08\x12\x60\x28\xdc\xe0\x5a\xfc\x7c\xc1\xd2\x1b\xdf\x87\x21\x8e\xdc\x1b\x5f\x00\x65\xb7\x96\xed\x94\xa5\xdc\x44\x55\xd5\x50\xf4\x63\xa2\x0a\x79\xc8\x18\xba\x02\x6b\xce\x11\xc0\x0a\x05\x1f\xd5\x15\xab\x6b\x4e\x2f\xcc\xf5\x85\x19\x81\x39\xb9\x32\x83\x2b\x33\xee\x3a\xd0\xa5\xec\xb6\x6b\x1f\x0d\x58\x6f\xf5\x63\x72\x8a\x6f\xf5\xec\xd3\x1a\x7b\x07\x8c\x6c\x9e\xcb\x4d\x31\x3b\x63\xc1\x8e\x7d\xaf\x97\x2b\xb9\x9e\xdf\x97\xa5\x4c\xb4\xac\xaa\xbf\xc7\x1d\x03\x06\x64\x4c\xa8\x70\x8c\x4e\xb1\xcd\x24\x08\xbc\x7b\xf9\xad\x8a\x64\x7f\x88\x95\x4c\x22\x0d\x6d\x5b\xbf\x85\x8c\x36\xc8\xfa\xe5\x0e\xe8\x18\x9d\x65\x2e\xe7\x85\xac\x97\xd9\xc3\x9f\xb2\xa8\x7d\x15\xc9\x44\xb6\xae\xf2\x34\x3d\xb1\xcc\x3a\x8d\x54\xac\x64\x34\x5b\x6c\x5b\x95\xe7\x34\x7f\xd0\xd9\x7c\x29\x8f\x9b\xae\x39\x09\x5c\x3e\x85\xef\x38\x05\xeb\xf0\x9d\xa3\x22\xdb\xb0\xe1\x8d\x43\x8d\xbd\x75\xbf\xeb\xd5\x09\x0e\x51\xc0\x53\x11\x7f\x59\x2f\x3e\xef\xf6\xea\x1b\xc6\x9b\x1e\x83\xd0\x10\xb9\x00\x32\xa6\x8c\x23\x10\x7a\x2a\xd5\x60\x85\xe8\xa3\x27\xe0\x03\x8c\x38\x0b\xce\xc7\x1e\x18\x1f\x22\x87\xc1\x14\x0e\x92\x80\xa1\x67\xf7\x8d\xe6\xcf\x6e\xfb\xbf\x17\xf0\x4e\x93\x81\x51\xf0\x18\x1d\xf9\xc4\x13\x30\x64\x75\x18\x27\x84\x8e\xdb\x82\x9a\x2f\xa4\x91\xc3\xf8\x3f\x2c\xf9\x4f\x5d\xaf\xf3\x87\xe8\xa3\xc0\x33\x18\x78\x5e\xc9\x5c\xc2\x6b\xc8\xbe\xc2\xc7\xbe\xf1\x27\x00\x00\xff\xff\xd3\x97\xb4\x77\x9f\x04\x00\x00") + +func _000009_blocks_historyUpSqlBytes() ([]byte, error) { + return bindataRead( + __000009_blocks_historyUpSql, "000009_blocks_history.up.sql", ) } -var __000010_blocks_created_by_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x54\xc1\x6e\x9b\x40\x10\xbd\xf3\x15\x73\x41\x86\xca\x89\x2a\xb5\xb2\xaa\x58\xaa\x84\x61\x6c\xd3\xc2\xae\xb5\x6c\x9a\xb8\x17\xc7\x36\x4b\x8d\x82\x0d\x01\xa2\xd4\x42\xfc\x7b\x85\x0d\x0e\x8e\xb1\xa3\xaa\xce\xa5\xca\x71\x77\x67\xde\x7b\x33\x3b\xf3\x34\x8b\x23\x03\xae\xf5\x2c\x84\x2c\xbb\x8c\x62\xe1\xf9\xbf\xf3\x7c\x16\x84\xf3\xfb\x04\x18\x12\xcd\x46\xe0\xf4\xf0\x6d\x12\x06\x6e\x57\xd2\x19\x6a\x1c\xcb\x7c\xb3\x0f\x84\x72\xc0\x5b\xd3\xe1\x4e\x03\x9a\x22\x01\x00\xf8\x2e\xfc\xd0\x98\x3e\xd4\x98\xf2\xa9\xa3\xb6\x37\x77\x59\xe6\x7b\x70\x19\x85\x49\xfa\x2b\x16\x49\x9e\xfb\xab\x44\xc4\xe9\x64\x9a\x02\x37\x6d\x74\xb8\x66\x8f\xf8\xcf\x0d\x38\xb9\xb6\x2c\x30\xb0\xaf\x5d\x5b\x1c\x08\xbd\x51\xd4\x76\x96\x89\x95\x9b\xe7\x35\xa0\xe4\x21\xf0\x53\x51\x87\x31\x34\x8e\x05\xd4\x01\x86\xe2\x70\xd6\x2f\x5e\x94\x96\x3c\xbe\x90\x97\x17\xb2\x0b\xf2\xf0\x4a\xb6\xaf\x64\xaf\xd5\x86\x16\xa1\x37\x2d\xb5\x89\x63\xb9\x4e\x1e\x82\x26\x0a\xa5\xa3\x36\x2b\xed\xec\xc3\x44\xd3\x58\xac\xd2\xc9\xf1\x76\x94\x0c\x77\xc9\x7c\x21\x96\xd3\xbb\x2c\x13\x41\x22\xf2\x7c\x7b\x2c\x91\xa0\x67\x0e\x4c\xc2\xb7\x69\xe9\x3a\x12\xc0\xf1\xb6\x3a\xfa\x69\x50\x3f\x7b\xbe\x08\xdc\xe4\xa0\xd7\xdf\x1c\x4a\x2a\xec\x22\xb8\x44\xde\xe6\xcc\x63\x31\x4d\x45\x51\x5e\x9d\xe8\x31\x72\x1b\x6e\x5d\x11\x88\xc3\xdb\x38\x0c\x9b\x8b\x5c\x86\xae\xef\xf9\xc2\x9d\xcc\xd6\x87\x8f\x4f\x61\x7c\x9f\x44\xd3\xb9\x68\x4c\x1d\x31\xd3\xd6\xd8\x18\xbe\xe3\x18\x94\x7a\x68\xdb\x77\xd5\x4d\x84\xba\xdf\xc3\xea\x1b\x0a\x18\x4d\x2f\x26\xde\x41\x0e\x8f\xa9\xf7\x65\x39\xfb\x5c\x16\xdc\x95\xa4\xbd\x1c\xc9\x24\x0e\x32\x0e\xe6\x80\x50\x86\x60\x92\xa6\x2d\x00\xc5\x41\x0b\x75\x0e\x1f\xa0\xcf\xa8\xdd\xbc\x26\x40\x99\x81\x0c\x7a\x63\xa8\x4d\x0b\x3a\xba\xda\x95\xaa\x81\x78\xf9\x29\x3b\xf2\x37\x60\x05\x4a\x40\xa7\xa4\x6f\x99\x3a\x07\x83\x16\xc3\x3a\x34\xc9\xe0\xa5\x98\x6a\x89\x2a\x29\x94\xbd\xd2\x8a\x7f\xd0\xf4\xcc\x6d\xa0\x85\x1c\x8f\x40\xc0\xd3\x42\xc4\xa2\x36\x68\x5f\xe1\x63\x57\x32\x18\x1d\x1d\x73\xb0\xad\x4b\x49\xd2\x49\x9b\x9b\x2c\xfc\x24\x0d\xe3\xf5\x49\xbb\x2b\x63\xfe\xde\xf6\x76\xe8\xef\xf6\xf7\x6e\x7f\xff\x99\xfd\x3d\xcf\xf6\x6b\xcb\x5f\x5b\x9f\xb3\xdb\xe1\x79\x55\xbc\x91\x3d\xee\x44\x9e\x41\x63\xcd\x2e\x4f\x79\xdf\x9e\x65\xfd\x09\x00\x00\xff\xff\x5f\xbd\x27\xe2\xe9\x09\x00\x00") +func _000009_blocks_historyUpSql() (*asset, error) { + bytes, err := _000009_blocks_historyUpSqlBytes() + if err != nil { + return nil, err + } -func _000010_blocks_created_by_down_sql() ([]byte, error) { - return bindata_read( - __000010_blocks_created_by_down_sql, + info := bindataFileInfo{name: "000009_blocks_history.up.sql", size: 1183, mode: os.FileMode(436), modTime: time.Unix(1631562120, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000010_blocks_created_byDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x54\xc1\x6e\x9b\x40\x10\xbd\xf3\x15\x73\x41\x86\xca\x89\x2a\xb5\xb2\xaa\x58\xaa\x84\x61\x6c\xd3\xc2\xae\xb5\x6c\x9a\xb8\x17\xc7\x36\x4b\x8d\x82\x0d\x01\xa2\xd4\x42\xfc\x7b\x85\x0d\x0e\x8e\xb1\xa3\xaa\xce\xa5\xca\x71\x77\x67\xde\x7b\x33\x3b\xf3\x34\x8b\x23\x03\xae\xf5\x2c\x84\x2c\xbb\x8c\x62\xe1\xf9\xbf\xf3\x7c\x16\x84\xf3\xfb\x04\x18\x12\xcd\x46\xe0\xf4\xf0\x6d\x12\x06\x6e\x57\xd2\x19\x6a\x1c\xcb\x7c\xb3\x0f\x84\x72\xc0\x5b\xd3\xe1\x4e\x03\x9a\x22\x01\x00\xf8\x2e\xfc\xd0\x98\x3e\xd4\x98\xf2\xa9\xa3\xb6\x37\x77\x59\xe6\x7b\x70\x19\x85\x49\xfa\x2b\x16\x49\x9e\xfb\xab\x44\xc4\xe9\x64\x9a\x02\x37\x6d\x74\xb8\x66\x8f\xf8\xcf\x0d\x38\xb9\xb6\x2c\x30\xb0\xaf\x5d\x5b\x1c\x08\xbd\x51\xd4\x76\x96\x89\x95\x9b\xe7\x35\xa0\xe4\x21\xf0\x53\x51\x87\x31\x34\x8e\x05\xd4\x01\x86\xe2\x70\xd6\x2f\x5e\x94\x96\x3c\xbe\x90\x97\x17\xb2\x0b\xf2\xf0\x4a\xb6\xaf\x64\xaf\xd5\x86\x16\xa1\x37\x2d\xb5\x89\x63\xb9\x4e\x1e\x82\x26\x0a\xa5\xa3\x36\x2b\xed\xec\xc3\x44\xd3\x58\xac\xd2\xc9\xf1\x76\x94\x0c\x77\xc9\x7c\x21\x96\xd3\xbb\x2c\x13\x41\x22\xf2\x7c\x7b\x2c\x91\xa0\x67\x0e\x4c\xc2\xb7\x69\xe9\x3a\x12\xc0\xf1\xb6\x3a\xfa\x69\x50\x3f\x7b\xbe\x08\xdc\xe4\xa0\xd7\xdf\x1c\x4a\x2a\xec\x22\xb8\x44\xde\xe6\xcc\x63\x31\x4d\x45\x51\x5e\x9d\xe8\x31\x72\x1b\x6e\x5d\x11\x88\xc3\xdb\x38\x0c\x9b\x8b\x5c\x86\xae\xef\xf9\xc2\x9d\xcc\xd6\x87\x8f\x4f\x61\x7c\x9f\x44\xd3\xb9\x68\x4c\x1d\x31\xd3\xd6\xd8\x18\xbe\xe3\x18\x94\x7a\x68\xdb\x77\xd5\x4d\x84\xba\xdf\xc3\xea\x1b\x0a\x18\x4d\x2f\x26\xde\x41\x0e\x8f\xa9\xf7\x65\x39\xfb\x5c\x16\xdc\x95\xa4\xbd\x1c\xc9\x24\x0e\x32\x0e\xe6\x80\x50\x86\x60\x92\xa6\x2d\x00\xc5\x41\x0b\x75\x0e\x1f\xa0\xcf\xa8\xdd\xbc\x26\x40\x99\x81\x0c\x7a\x63\xa8\x4d\x0b\x3a\xba\xda\x95\xaa\x81\x78\xf9\x29\x3b\xf2\x37\x60\x05\x4a\x40\xa7\xa4\x6f\x99\x3a\x07\x83\x16\xc3\x3a\x34\xc9\xe0\xa5\x98\x6a\x89\x2a\x29\x94\xbd\xd2\x8a\x7f\xd0\xf4\xcc\x6d\xa0\x85\x1c\x8f\x40\xc0\xd3\x42\xc4\xa2\x36\x68\x5f\xe1\x63\x57\x32\x18\x1d\x1d\x73\xb0\xad\x4b\x49\xd2\x49\x9b\x9b\x2c\xfc\x24\x0d\xe3\xf5\x49\xbb\x2b\x63\xfe\xde\xf6\x76\xe8\xef\xf6\xf7\x6e\x7f\xff\x99\xfd\x3d\xcf\xf6\x6b\xcb\x5f\x5b\x9f\xb3\xdb\xe1\x79\x55\xbc\x91\x3d\xee\x44\x9e\x41\x63\xcd\x2e\x4f\x79\xdf\x9e\x65\xfd\x09\x00\x00\xff\xff\x5f\xbd\x27\xe2\xe9\x09\x00\x00") + +func _000010_blocks_created_byDownSqlBytes() ([]byte, error) { + return bindataRead( + __000010_blocks_created_byDownSql, "000010_blocks_created_by.down.sql", ) } -var __000010_blocks_created_by_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x8e\x41\x4b\xc4\x30\x10\x85\xef\xfd\x15\x73\x6b\x0a\xb2\x20\x82\x97\x65\x0f\xb3\x49\x44\x21\x6e\x25\x4d\x05\x4f\x65\xb7\x9d\xb2\xc1\xc6\x48\x12\xd0\x52\xfa\xdf\xa5\x78\x11\xd4\xb2\x97\x39\xcc\x7b\xef\xe3\x43\x65\xa4\x06\x83\x7b\x25\x61\x9a\x36\xef\x81\x7a\xfb\x39\xcf\xa7\xc1\xb7\xaf\x11\x50\x08\xe0\xa5\xaa\x1f\x0f\xd0\x06\x3a\x26\xea\x9a\xd3\x08\xcf\xa8\xf9\x3d\x6a\x76\x73\x5b\x6c\xb3\x55\x40\x73\xb6\x31\xf9\x30\x5e\x02\xca\xea\x27\x81\xe6\x2f\x8b\x4a\x9a\x9f\xab\x1d\xf0\x12\x95\xac\xb8\x64\x87\x5a\xa9\x87\x3b\xc6\x22\x0d\xd4\x26\x70\xbe\xb3\xbd\xfd\x6e\xf5\xc1\xbb\x15\xa1\x8f\x33\x05\xfa\x3f\xdf\xd8\x0e\x76\xbf\xe3\xe5\x5d\x6a\x21\x35\xec\x5f\xd6\xc6\x6f\x91\x42\x6a\x8e\x09\xb0\xe2\x30\x58\x67\x13\x5c\x17\x57\x90\xe7\xcb\x89\x63\x4c\xe4\xf2\x62\x9b\x7d\x05\x00\x00\xff\xff\xcb\x4a\xd7\xe3\x7d\x01\x00\x00") +func _000010_blocks_created_byDownSql() (*asset, error) { + bytes, err := _000010_blocks_created_byDownSqlBytes() + if err != nil { + return nil, err + } -func _000010_blocks_created_by_up_sql() ([]byte, error) { - return bindata_read( - __000010_blocks_created_by_up_sql, + info := bindataFileInfo{name: "000010_blocks_created_by.down.sql", size: 2537, mode: os.FileMode(436), modTime: time.Unix(1631562120, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000010_blocks_created_byUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x8e\x41\x4b\xc4\x30\x10\x85\xef\xfd\x15\x73\x6b\x0a\xb2\x20\x82\x97\x65\x0f\xb3\x49\x44\x21\x6e\x25\x4d\x05\x4f\x65\xb7\x9d\xb2\xc1\xc6\x48\x12\xd0\x52\xfa\xdf\xa5\x78\x11\xd4\xb2\x97\x39\xcc\x7b\xef\xe3\x43\x65\xa4\x06\x83\x7b\x25\x61\x9a\x36\xef\x81\x7a\xfb\x39\xcf\xa7\xc1\xb7\xaf\x11\x50\x08\xe0\xa5\xaa\x1f\x0f\xd0\x06\x3a\x26\xea\x9a\xd3\x08\xcf\xa8\xf9\x3d\x6a\x76\x73\x5b\x6c\xb3\x55\x40\x73\xb6\x31\xf9\x30\x5e\x02\xca\xea\x27\x81\xe6\x2f\x8b\x4a\x9a\x9f\xab\x1d\xf0\x12\x95\xac\xb8\x64\x87\x5a\xa9\x87\x3b\xc6\x22\x0d\xd4\x26\x70\xbe\xb3\xbd\xfd\x6e\xf5\xc1\xbb\x15\xa1\x8f\x33\x05\xfa\x3f\xdf\xd8\x0e\x76\xbf\xe3\xe5\x5d\x6a\x21\x35\xec\x5f\xd6\xc6\x6f\x91\x42\x6a\x8e\x09\xb0\xe2\x30\x58\x67\x13\x5c\x17\x57\x90\xe7\xcb\x89\x63\x4c\xe4\xf2\x62\x9b\x7d\x05\x00\x00\xff\xff\xcb\x4a\xd7\xe3\x7d\x01\x00\x00") + +func _000010_blocks_created_byUpSqlBytes() ([]byte, error) { + return bindataRead( + __000010_blocks_created_byUpSql, "000010_blocks_created_by.up.sql", ) } -var __000011_match_collation_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x04\xc0\x31\x0e\x85\x20\x0c\x06\xe0\x9d\x53\xfc\x17\xe8\xf0\xe6\x37\x1a\x36\xe3\x22\x17\x80\x58\xa1\xb1\x69\x8d\x74\xf1\xf6\x7e\x44\xd8\x3c\x86\x58\x47\x38\x1a\xe3\x70\x63\x0c\x7e\x38\x11\xa1\x0c\x99\xb8\x6b\x67\xc8\x84\x58\xb0\x85\xb8\x55\xd5\x17\xca\x67\xa0\x69\xb5\x2b\xed\x79\xcd\x4b\xc1\xef\x9f\xbe\x00\x00\x00\xff\xff\x54\x6c\x45\x67\x4e\x00\x00\x00") +func _000010_blocks_created_byUpSql() (*asset, error) { + bytes, err := _000010_blocks_created_byUpSqlBytes() + if err != nil { + return nil, err + } -func _000011_match_collation_down_sql() ([]byte, error) { - return bindata_read( - __000011_match_collation_down_sql, + info := bindataFileInfo{name: "000010_blocks_created_by.up.sql", size: 381, mode: os.FileMode(436), modTime: time.Unix(1625794710, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000011_match_collationDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x04\xc0\x31\x0e\x85\x20\x0c\x06\xe0\x9d\x53\xfc\x17\xe8\xf0\xe6\x37\x1a\x36\xe3\x22\x17\x80\x58\xa1\xb1\x69\x8d\x74\xf1\xf6\x7e\x44\xd8\x3c\x86\x58\x47\x38\x1a\xe3\x70\x63\x0c\x7e\x38\x11\xa1\x0c\x99\xb8\x6b\x67\xc8\x84\x58\xb0\x85\xb8\x55\xd5\x17\xca\x67\xa0\x69\xb5\x2b\xed\x79\xcd\x4b\xc1\xef\x9f\xbe\x00\x00\x00\xff\xff\x54\x6c\x45\x67\x4e\x00\x00\x00") + +func _000011_match_collationDownSqlBytes() ([]byte, error) { + return bindataRead( + __000011_match_collationDownSql, "000011_match_collation.down.sql", ) } -var __000011_match_collation_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x95\xcd\x6e\xda\x40\x14\x85\xf7\x3c\xc5\x51\x36\x80\xd4\x58\xea\x3a\x42\xaa\x63\xa6\xea\xc2\x0d\x29\xb8\x4a\x77\x68\x62\xae\xf1\x28\xf3\x43\xe6\x8e\x45\x91\xe5\x77\xaf\x3a\xc6\x01\x55\xd9\x51\x29\x6c\xed\x73\xbe\x3b\xdf\xcc\xe2\xb6\xad\xaa\x20\xed\x06\x89\x39\xf0\xab\x46\xb2\xd3\xcd\x56\xd9\xae\x1b\x01\xc0\xed\x2d\x4a\xa7\xb5\x0c\xca\x59\xb8\x0a\x46\x86\x40\xde\x38\x0e\x63\x46\x56\x4b\x6b\x49\x33\x82\x7c\xd6\x14\xf3\x2b\x51\xe0\xcb\x29\x94\xbd\x75\x67\x98\xac\x44\x2e\xb2\xa2\x0f\xaf\x4f\xd4\xca\x3b\x03\x65\x2b\xe7\x4d\xfc\xb0\xe6\xb2\x26\x23\x93\x98\x63\x3c\x7d\x13\x4b\x71\x2c\x59\x69\x08\x33\x8c\x87\xc1\x63\xa4\x0f\xf3\xe3\xbf\xbe\x75\x36\x67\x9e\x16\xe9\x7d\xba\x12\x93\xe9\x74\x7a\x37\x1a\x6c\x9e\xb5\x2b\x5f\xf8\x74\xd6\x66\xb7\x91\x81\xde\xce\xf9\xa3\x21\x7f\xc0\x0c\xd9\xe2\x21\x4b\x8b\xc9\x38\xcd\x0b\xb1\x44\x91\xde\xe7\x02\x6d\x9b\xec\x3c\x55\xea\x77\xd7\xf5\x14\x64\x8b\x3c\x4f\x0b\x81\xf1\xa7\x77\xa5\xa7\x77\x71\xce\xe3\x52\x3c\xa6\x4b\x01\x0e\x26\xe0\xeb\x72\xf1\xfd\xfd\xa9\x7d\x58\xfc\x12\xd9\xcf\xa2\x0f\xf7\x5f\xe6\x22\xcd\xf3\x45\xf6\x77\xce\x39\xe9\x5f\x25\xd4\x8a\x83\xf3\x87\xff\xa3\xb6\x3e\xd2\xae\x44\x91\x89\x59\x39\x7b\xf1\xbb\x0d\x9c\x6b\xd1\xaa\xa5\x57\x76\x7b\xb1\x55\x8f\xb9\x16\xa9\x03\x07\x32\x60\x0a\x41\xd9\xed\xe5\x4f\x16\x71\xeb\x01\x77\x25\x92\x0d\x93\xbf\x58\x2d\x42\xae\x44\x68\xef\xfc\x0b\xef\x64\x49\x17\x5b\x9d\x48\x1f\xac\xd6\xb6\xa4\x99\x4e\x8b\xec\x89\x60\x89\x36\x90\x78\x8d\x26\x35\x79\x82\x0b\x35\xf9\xbd\x62\x42\xa8\x09\x46\x6d\x7d\xbf\x95\xf6\x4a\x6b\x78\xe2\x46\x87\xa1\xaf\x2c\xa4\x05\x99\x5d\x38\x1c\x09\xfb\x9a\x6c\xec\xa9\x0a\xa5\xb3\x1b\x15\xab\x8a\x51\x49\xcd\x94\x0c\x45\x71\x56\x29\x65\xc3\xc4\x90\xb8\xe9\xaf\x73\x2f\xb9\x47\xde\x80\xbc\x77\x3e\x39\x5e\x7f\x5c\x61\x9f\xa3\x84\xdd\x74\xdd\xe8\x4f\x00\x00\x00\xff\xff\xed\x3f\x00\x0b\xa7\x07\x00\x00") +func _000011_match_collationDownSql() (*asset, error) { + bytes, err := _000011_match_collationDownSqlBytes() + if err != nil { + return nil, err + } -func _000011_match_collation_up_sql() ([]byte, error) { - return bindata_read( - __000011_match_collation_up_sql, + info := bindataFileInfo{name: "000011_match_collation.down.sql", size: 78, mode: os.FileMode(436), modTime: time.Unix(1631562120, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000011_match_collationUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xcc\x95\xcd\x6e\xda\x40\x14\x85\xf7\x3c\xc5\x51\x36\x80\xd4\x58\xea\x3a\x42\xaa\x63\xa6\xea\xc2\x0d\x29\xb8\x4a\x77\x68\x62\xae\xf1\x28\xf3\x43\xe6\x8e\x45\x91\xe5\x77\xaf\x3a\xc6\x01\x55\xd9\x51\x29\x6c\xed\x73\xbe\x3b\xdf\xcc\xe2\xb6\xad\xaa\x20\xed\x06\x89\x39\xf0\xab\x46\xb2\xd3\xcd\x56\xd9\xae\x1b\x01\xc0\xed\x2d\x4a\xa7\xb5\x0c\xca\x59\xb8\x0a\x46\x86\x40\xde\x38\x0e\x63\x46\x56\x4b\x6b\x49\x33\x82\x7c\xd6\x14\xf3\x2b\x51\xe0\xcb\x29\x94\xbd\x75\x67\x98\xac\x44\x2e\xb2\xa2\x0f\xaf\x4f\xd4\xca\x3b\x03\x65\x2b\xe7\x4d\xfc\xb0\xe6\xb2\x26\x23\x93\x98\x63\x3c\x7d\x13\x4b\x71\x2c\x59\x69\x08\x33\x8c\x87\xc1\x63\xa4\x0f\xf3\xe3\xbf\xbe\x75\x36\x67\x9e\x16\xe9\x7d\xba\x12\x93\xe9\x74\x7a\x37\x1a\x6c\x9e\xb5\x2b\x5f\xf8\x74\xd6\x66\xb7\x91\x81\xde\xce\xf9\xa3\x21\x7f\xc0\x0c\xd9\xe2\x21\x4b\x8b\xc9\x38\xcd\x0b\xb1\x44\x91\xde\xe7\x02\x6d\x9b\xec\x3c\x55\xea\x77\xd7\xf5\x14\x64\x8b\x3c\x4f\x0b\x81\xf1\xa7\x77\xa5\xa7\x77\x71\xce\xe3\x52\x3c\xa6\x4b\x01\x0e\x26\xe0\xeb\x72\xf1\xfd\xfd\xa9\x7d\x58\xfc\x12\xd9\xcf\xa2\x0f\xf7\x5f\xe6\x22\xcd\xf3\x45\xf6\x77\xce\x39\xe9\x5f\x25\xd4\x8a\x83\xf3\x87\xff\xa3\xb6\x3e\xd2\xae\x44\x91\x89\x59\x39\x7b\xf1\xbb\x0d\x9c\x6b\xd1\xaa\xa5\x57\x76\x7b\xb1\x55\x8f\xb9\x16\xa9\x03\x07\x32\x60\x0a\x41\xd9\xed\xe5\x4f\x16\x71\xeb\x01\x77\x25\x92\x0d\x93\xbf\x58\x2d\x42\xae\x44\x68\xef\xfc\x0b\xef\x64\x49\x17\x5b\x9d\x48\x1f\xac\xd6\xb6\xa4\x99\x4e\x8b\xec\x89\x60\x89\x36\x90\x78\x8d\x26\x35\x79\x82\x0b\x35\xf9\xbd\x62\x42\xa8\x09\x46\x6d\x7d\xbf\x95\xf6\x4a\x6b\x78\xe2\x46\x87\xa1\xaf\x2c\xa4\x05\x99\x5d\x38\x1c\x09\xfb\x9a\x6c\xec\xa9\x0a\xa5\xb3\x1b\x15\xab\x8a\x51\x49\xcd\x94\x0c\x45\x71\x56\x29\x65\xc3\xc4\x90\xb8\xe9\xaf\x73\x2f\xb9\x47\xde\x80\xbc\x77\x3e\x39\x5e\x7f\x5c\x61\x9f\xa3\x84\xdd\x74\xdd\xe8\x4f\x00\x00\x00\xff\xff\xed\x3f\x00\x0b\xa7\x07\x00\x00") + +func _000011_match_collationUpSqlBytes() ([]byte, error) { + return bindataRead( + __000011_match_collationUpSql, "000011_match_collation.up.sql", ) } -var __000012_match_column_collation_down_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x04\xc0\x31\x0e\x85\x20\x0c\x06\xe0\x9d\x53\xfc\x17\xe8\xf0\xe6\x37\x1a\x36\xe3\x22\x17\x80\x58\xa1\xb1\x69\x8d\x74\xf1\xf6\x7e\x44\xd8\x3c\x86\x58\x47\x38\x1a\xe3\x70\x63\x0c\x7e\x38\x11\xa1\x0c\x99\xb8\x6b\x67\xc8\x84\x58\xb0\x85\xb8\x55\xd5\x17\xca\x67\xa0\x69\xb5\x2b\xed\x79\xcd\x4b\xc1\xef\x9f\xbe\x00\x00\x00\xff\xff\x54\x6c\x45\x67\x4e\x00\x00\x00") +func _000011_match_collationUpSql() (*asset, error) { + bytes, err := _000011_match_collationUpSqlBytes() + if err != nil { + return nil, err + } -func _000012_match_column_collation_down_sql() ([]byte, error) { - return bindata_read( - __000012_match_column_collation_down_sql, + info := bindataFileInfo{name: "000011_match_collation.up.sql", size: 1959, mode: os.FileMode(436), modTime: time.Unix(1631562120, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000012_match_column_collationDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x04\xc0\x31\x0e\x85\x20\x0c\x06\xe0\x9d\x53\xfc\x17\xe8\xf0\xe6\x37\x1a\x36\xe3\x22\x17\x80\x58\xa1\xb1\x69\x8d\x74\xf1\xf6\x7e\x44\xd8\x3c\x86\x58\x47\x38\x1a\xe3\x70\x63\x0c\x7e\x38\x11\xa1\x0c\x99\xb8\x6b\x67\xc8\x84\x58\xb0\x85\xb8\x55\xd5\x17\xca\x67\xa0\x69\xb5\x2b\xed\x79\xcd\x4b\xc1\xef\x9f\xbe\x00\x00\x00\xff\xff\x54\x6c\x45\x67\x4e\x00\x00\x00") + +func _000012_match_column_collationDownSqlBytes() ([]byte, error) { + return bindataRead( + __000012_match_column_collationDownSql, "000012_match_column_collation.down.sql", ) } -var __000012_match_column_collation_up_sql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x96\x4f\x4f\xe3\x3c\x10\xc6\xef\x7c\x8a\x11\x97\x50\x09\x2a\xbd\x67\x54\xe9\x35\xc1\x2b\x0e\xa1\x65\x53\xb3\xec\xad\x32\xe9\xa4\xb1\xf0\x9f\xe2\x71\xd4\xad\xaa\x7c\xf7\x15\x4e\x42\x2a\xd4\x3d\x95\x4b\xae\xc9\xf3\x3c\x33\xf3\x1b\x1f\xe6\x70\x50\x25\x48\xbb\x86\xa9\xd9\xd3\xbb\x86\xe9\x56\xd7\x1b\x65\x9b\xe6\x02\x00\xe0\xe6\x06\x0a\xa7\xb5\x0c\xca\x59\x70\x25\x18\x19\x02\x7a\xe3\x28\x24\x04\x69\x25\xad\x45\x4d\x10\xe4\xab\xc6\xa8\x5f\x72\x01\xff\x0f\xa2\xf4\xd3\x3b\x83\xab\x25\xcf\x78\x2a\x5a\xf1\x6a\x48\x2d\xbd\x33\xa0\x6c\xe9\xbc\x89\x1f\x56\x54\x54\x68\xe4\x34\xea\x08\x5e\x1e\x78\xce\x3b\x93\x95\x06\x61\x06\x49\x5f\x38\x01\x36\xbf\xef\xfe\xb5\xae\xa3\x3a\xf7\x4c\xb0\x3b\xb6\xe4\x57\x93\xc9\xe4\xf6\x64\x73\x95\xf4\x84\xe1\xc8\x92\x3e\xb0\x9c\xa5\x82\xe7\xab\x25\x17\xab\x39\x7b\xe4\xff\xec\xae\x70\xba\x36\xf6\x7b\xda\x8b\xb2\x74\x91\x3d\x3f\xce\xdb\xa2\x33\x48\xe6\xd2\x60\x32\xb9\xbd\xe8\xb7\xf0\xaa\x5d\xf1\x46\xc3\x18\xf5\x76\x2d\x03\x7e\xf2\xfd\x59\xa3\xdf\xc3\x0c\xd2\xc5\x3c\x65\xe2\x2a\x61\x99\xe0\x39\x08\x76\x97\x71\x38\x1c\xa6\x5b\x8f\xa5\xfa\xd3\x34\x6d\xca\x87\xea\x17\xcf\x05\x88\xc5\x30\x72\x8c\x4d\xae\x4f\x00\xba\x86\xe4\xa3\xbb\x8c\x09\xfe\x55\xd0\x97\xef\x00\x3f\xe5\xfc\x89\xe5\x1c\x28\x98\x00\x3f\xf2\xc5\xe3\xe9\x3e\x5b\x31\xff\xcd\xd3\x67\xd1\x8a\xdb\x2f\xf7\x9c\x65\xd9\x22\xfd\xa8\x73\x9c\xf4\x15\x02\x54\x8a\x82\xf3\xfb\xef\x81\xb1\xea\xd2\x46\x0b\x85\x90\x48\x39\x7b\xf6\xdb\xe8\x73\xc6\x0b\xa2\x92\x5e\xd9\xcd\xd9\x1c\xda\x98\xf1\x62\xd8\x53\x40\x03\x84\x21\x28\xbb\x39\xff\x59\xc4\xb8\x55\x1f\x37\x5a\x2c\x35\xa1\x3f\x1b\x46\x0c\x19\x2d\x82\x9d\xf3\x6f\xb4\x95\x05\x9e\xcd\x61\x48\x1a\x1d\x8c\xc3\x01\x35\xe1\x70\xde\xbc\x20\x58\xc4\x35\x48\x78\x8f\xb3\x57\xe8\x11\x5c\xa8\xd0\xef\x14\x21\x84\x0a\xc1\xa8\x8d\x6f\x6f\x95\x9d\xd2\x1a\x3c\x52\xad\x43\xef\x57\x16\xa4\x05\x34\xdb\xb0\xef\x12\x76\x15\xda\xe8\x53\x25\x14\xce\xae\x55\xb4\x2a\x82\x52\x6a\xc2\x69\x6f\xe4\x47\x96\x42\xd6\x84\x04\x12\x2e\xdb\x05\xec\x24\xb5\x91\x97\x80\xde\x3b\x3f\xed\x16\x16\x2f\x87\xff\xe2\x10\x76\xdd\x34\x17\x7f\x03\x00\x00\xff\xff\x15\xde\x90\xeb\xbd\x09\x00\x00") +func _000012_match_column_collationDownSql() (*asset, error) { + bytes, err := _000012_match_column_collationDownSqlBytes() + if err != nil { + return nil, err + } -func _000012_match_column_collation_up_sql() ([]byte, error) { - return bindata_read( - __000012_match_column_collation_up_sql, + info := bindataFileInfo{name: "000012_match_column_collation.down.sql", size: 78, mode: os.FileMode(436), modTime: time.Unix(1632841616, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000012_match_column_collationUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x96\xcf\x6e\xe2\x3c\x14\xc5\xf7\x7d\x8a\xab\x6e\x52\xa4\x16\xe9\x5b\x57\x48\x9f\x9b\x7a\xd4\x45\x0a\x9d\x90\x4e\x67\x87\x5c\xb8\x21\x56\xfd\x27\xf5\x75\x86\x41\x88\x77\x1f\x61\x27\x04\x75\x3a\x2b\xba\xc9\x12\x73\xce\xef\xfa\x1c\x67\x71\x77\x3b\x59\x82\x30\x2b\x18\xeb\x2d\xbd\x2b\x18\xd7\xaa\x59\x4b\xb3\xdf\x5f\x00\x00\xdc\xdc\x80\xaf\x24\x81\x96\x6b\x27\xbc\xb4\x06\x44\x5d\x2b\x89\x04\x4b\xab\x54\x3c\xb1\xe6\xf0\xa3\xd1\x06\x14\xfe\x42\x35\xee\x8c\x27\x8a\x12\xb4\xf0\x1e\x9d\xb6\xe4\x13\x82\xb4\x12\xc6\xa0\x22\xf0\xe2\x55\x61\xd0\xcf\x79\x01\xff\xf7\xa2\xf4\xe8\x9d\xc0\xd5\x9c\x67\x3c\x2d\xa2\x78\xd1\x53\x4b\x67\x35\x48\x53\x5a\xa7\xc3\xc1\x82\x96\x15\x6a\x31\x0e\x3a\x82\x97\x07\x9e\xf3\xd6\x64\x84\x46\x98\x40\xd2\x0d\x4e\x80\x4d\xef\xdb\xff\xa2\xeb\x64\xce\x3d\x2b\xd8\x1d\x9b\xf3\xab\xd1\x68\x74\x7b\x0c\x53\x09\x47\xe8\xff\x8e\xf2\x70\x1a\x25\x21\x98\x1e\x46\xc5\x3e\x3e\x0d\xd6\x72\xfa\x71\xe9\x03\xcb\x59\x5a\xf0\x7c\x31\xe7\xc5\x62\xca\x1e\xf9\x3f\x93\x45\xec\xd7\x44\x0b\xb2\x74\x96\x3d\x3f\x4e\xe3\xd0\x09\x24\x87\xbb\x27\xa3\xdb\x8b\x2e\xf4\xab\xb2\xcb\x37\xea\x63\x34\xf5\x4a\x78\x3c\xbe\xcd\xf7\x06\xdd\x16\x26\x90\xce\xa6\x29\x2b\xae\x12\x96\x15\x3c\x87\x82\xdd\x65\x1c\x76\xbb\x71\xed\xb0\x94\xbf\xf7\xfb\x48\x39\xa8\x7e\xf0\xbc\x80\x62\xd6\x47\x0e\xd8\xe4\xfa\x93\x82\xae\x21\x39\xdc\x2e\x63\x05\xff\x28\xe8\xc6\xb7\x8f\xf3\x94\xf3\x27\x96\x73\x20\xaf\x3d\x7c\xcb\x67\x8f\x9f\xdf\x33\x8a\xf9\x4f\x9e\x3e\x17\x51\x1c\x4f\xee\x39\xcb\xb2\x59\x7a\x98\x73\x4a\xfa\x58\x02\x54\x92\xbc\x75\xdb\xaf\x29\x63\xd1\xd2\x06\x5b\x0a\x21\x91\xb4\xe6\xec\x6f\xa3\xe3\x0c\xb7\x88\x4a\x38\x69\xd6\x67\xf7\x10\x31\xc3\xad\x61\x4b\x1e\x35\x10\x7a\x2f\xcd\xfa\xfc\xcf\x22\xe0\x16\x1d\x6e\xb0\xb5\x34\x84\xee\xec\x32\x02\x64\xb0\x15\x6c\xac\x7b\xa3\x5a\x2c\xf1\xec\x1e\x7a\xd2\xe0\xca\xd8\xed\x50\x11\xf6\x3b\xd5\x0b\x82\x41\x5c\x81\x80\xf7\x90\xbd\x42\x87\x60\x7d\x85\x6e\x23\x09\xc1\x57\x78\xb2\x71\x6d\xa4\x52\xe0\x90\x1a\xe5\x3b\xbf\x34\x20\x0c\xa0\xae\xfd\xb6\x25\x6c\x2a\x34\xc1\x27\x4b\x58\x5a\xb3\x92\xc1\x2a\x09\x4a\xa1\x08\x8f\x3b\x19\x3f\xb1\x2c\x45\x43\x48\x20\xe0\x32\x3e\xc0\x46\x50\x44\x5e\x02\x3a\x67\xdd\xb8\x7d\xb0\xb0\x39\xfc\x17\x42\x98\xd5\x7e\x7f\xf1\x27\x00\x00\xff\xff\xf5\xcb\x89\x20\x32\x0a\x00\x00") + +func _000012_match_column_collationUpSqlBytes() ([]byte, error) { + return bindataRead( + __000012_match_column_collationUpSql, "000012_match_column_collation.up.sql", ) } +func _000012_match_column_collationUpSql() (*asset, error) { + bytes, err := _000012_match_column_collationUpSqlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "000012_match_column_collation.up.sql", size: 2610, mode: os.FileMode(436), modTime: time.Unix(1632841616, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000013_millisecond_timestampsDownSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe2\x0a\x0d\x70\x71\x0c\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\x2d\x4e\x2d\x2a\x56\x08\x76\x0d\x51\x48\x2e\x4a\x4d\x2c\x49\x8d\x4f\x2c\x51\xb0\x45\xb0\xf5\x0d\x0d\x0c\x0c\x74\x14\x4a\x0b\x52\xe0\x72\x70\x36\x54\x2e\x25\x35\x27\x15\x26\x07\x67\x83\xe5\xb8\x38\xc3\x3d\x5c\x83\x5c\x91\x4c\xb6\x53\x00\x89\xc3\x81\x35\x17\x16\x17\x25\xe5\xe4\x27\x67\x0f\x46\x27\xc5\x67\x64\x16\x97\xe4\x17\x55\x0e\x2a\xa7\x95\xe7\x17\x65\x17\x17\x24\x26\xa7\x42\x42\x0c\xb7\xd5\x30\xe3\x11\x2a\x88\x31\xbe\x38\x23\xb1\x28\x33\x2f\x9d\x36\x66\xa7\x16\x17\x67\xe6\xe7\x51\x12\xd5\x44\x84\x19\x20\x00\x00\xff\xff\x27\x62\xfb\x7c\xf4\x02\x00\x00") + +func _000013_millisecond_timestampsDownSqlBytes() ([]byte, error) { + return bindataRead( + __000013_millisecond_timestampsDownSql, + "000013_millisecond_timestamps.down.sql", + ) +} + +func _000013_millisecond_timestampsDownSql() (*asset, error) { + bytes, err := _000013_millisecond_timestampsDownSqlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "000013_millisecond_timestamps.down.sql", size: 756, mode: os.FileMode(436), modTime: time.Unix(1633120008, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + +var __000013_millisecond_timestampsUpSql = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xe2\x0a\x0d\x70\x71\x0c\x71\x55\xa8\xae\xd6\x2b\x28\x4a\x4d\xcb\xac\xa8\xad\x2d\x2d\x4e\x2d\x2a\x56\x08\x76\x0d\x51\x48\x2e\x4a\x4d\x2c\x49\x8d\x4f\x2c\x51\xb0\x45\xb0\xb5\x0c\x0d\x0c\x0c\x74\x14\x4a\x0b\x52\xe0\x72\x70\x36\x54\x2e\x25\x35\x27\x15\x26\x07\x67\x83\xe5\xb8\x38\xc3\x3d\x5c\x83\x5c\x91\x4c\xb6\x51\x00\x89\xc3\x81\x35\x17\x16\x17\x25\xe5\xe4\x27\x67\x0f\x46\x27\xc5\x67\x64\x16\x97\xe4\x17\x55\x0e\x2a\xa7\x95\xe7\x17\x65\x17\x17\x24\x26\xa7\x42\x42\x0c\xb7\xd5\x30\xe3\x11\x2a\x88\x31\xbe\x38\x23\xb1\x28\x33\x2f\x9d\x36\x66\xa7\x16\x17\x67\xe6\xe7\x51\x12\xd5\x44\x84\x19\x20\x00\x00\xff\xff\x35\xca\x68\xeb\xf4\x02\x00\x00") + +func _000013_millisecond_timestampsUpSqlBytes() ([]byte, error) { + return bindataRead( + __000013_millisecond_timestampsUpSql, + "000013_millisecond_timestamps.up.sql", + ) +} + +func _000013_millisecond_timestampsUpSql() (*asset, error) { + bytes, err := _000013_millisecond_timestampsUpSqlBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "000013_millisecond_timestamps.up.sql", size: 756, mode: os.FileMode(436), modTime: time.Unix(1633119913, 0)} + a := &asset{bytes: bytes, info: info} + return a, nil +} + // Asset loads and returns the asset for the given name. // It returns an error if the asset could not be found or // could not be loaded. func Asset(name string) ([]byte, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { - return f() + a, err := f() + if err != nil { + return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) + } + return a.bytes, nil } return nil, fmt.Errorf("Asset %s not found", name) } +// MustAsset is like Asset but panics when Asset would return an error. +// It simplifies safe initialization of global variables. +func MustAsset(name string) []byte { + a, err := Asset(name) + if err != nil { + panic("asset: Asset(" + name + "): " + err.Error()) + } + + return a +} + +// AssetInfo loads and returns the asset info for the given name. +// It returns an error if the asset could not be found or +// could not be loaded. +func AssetInfo(name string) (os.FileInfo, error) { + cannonicalName := strings.Replace(name, "\\", "/", -1) + if f, ok := _bindata[cannonicalName]; ok { + a, err := f() + if err != nil { + return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) + } + return a.info, nil + } + return nil, fmt.Errorf("AssetInfo %s not found", name) +} + // AssetNames returns the names of the assets. func AssetNames() []string { names := make([]string, 0, len(_bindata)) @@ -262,32 +664,35 @@ func AssetNames() []string { } // _bindata is a table, holding each asset generator, mapped to its name. -var _bindata = map[string]func() ([]byte, error){ - "000001_init.down.sql": _000001_init_down_sql, - "000001_init.up.sql": _000001_init_up_sql, - "000002_system_settings_table.down.sql": _000002_system_settings_table_down_sql, - "000002_system_settings_table.up.sql": _000002_system_settings_table_up_sql, - "000003_blocks_rootid.down.sql": _000003_blocks_rootid_down_sql, - "000003_blocks_rootid.up.sql": _000003_blocks_rootid_up_sql, - "000004_auth_table.down.sql": _000004_auth_table_down_sql, - "000004_auth_table.up.sql": _000004_auth_table_up_sql, - "000005_blocks_modifiedby.down.sql": _000005_blocks_modifiedby_down_sql, - "000005_blocks_modifiedby.up.sql": _000005_blocks_modifiedby_up_sql, - "000006_sharing_table.down.sql": _000006_sharing_table_down_sql, - "000006_sharing_table.up.sql": _000006_sharing_table_up_sql, - "000007_workspaces_table.down.sql": _000007_workspaces_table_down_sql, - "000007_workspaces_table.up.sql": _000007_workspaces_table_up_sql, - "000008_teams.down.sql": _000008_teams_down_sql, - "000008_teams.up.sql": _000008_teams_up_sql, - "000009_blocks_history.down.sql": _000009_blocks_history_down_sql, - "000009_blocks_history.up.sql": _000009_blocks_history_up_sql, - "000010_blocks_created_by.down.sql": _000010_blocks_created_by_down_sql, - "000010_blocks_created_by.up.sql": _000010_blocks_created_by_up_sql, - "000011_match_collation.down.sql": _000011_match_collation_down_sql, - "000011_match_collation.up.sql": _000011_match_collation_up_sql, - "000012_match_column_collation.down.sql": _000012_match_column_collation_down_sql, - "000012_match_column_collation.up.sql": _000012_match_column_collation_up_sql, +var _bindata = map[string]func() (*asset, error){ + "000001_init.down.sql": _000001_initDownSql, + "000001_init.up.sql": _000001_initUpSql, + "000002_system_settings_table.down.sql": _000002_system_settings_tableDownSql, + "000002_system_settings_table.up.sql": _000002_system_settings_tableUpSql, + "000003_blocks_rootid.down.sql": _000003_blocks_rootidDownSql, + "000003_blocks_rootid.up.sql": _000003_blocks_rootidUpSql, + "000004_auth_table.down.sql": _000004_auth_tableDownSql, + "000004_auth_table.up.sql": _000004_auth_tableUpSql, + "000005_blocks_modifiedby.down.sql": _000005_blocks_modifiedbyDownSql, + "000005_blocks_modifiedby.up.sql": _000005_blocks_modifiedbyUpSql, + "000006_sharing_table.down.sql": _000006_sharing_tableDownSql, + "000006_sharing_table.up.sql": _000006_sharing_tableUpSql, + "000007_workspaces_table.down.sql": _000007_workspaces_tableDownSql, + "000007_workspaces_table.up.sql": _000007_workspaces_tableUpSql, + "000008_teams.down.sql": _000008_teamsDownSql, + "000008_teams.up.sql": _000008_teamsUpSql, + "000009_blocks_history.down.sql": _000009_blocks_historyDownSql, + "000009_blocks_history.up.sql": _000009_blocks_historyUpSql, + "000010_blocks_created_by.down.sql": _000010_blocks_created_byDownSql, + "000010_blocks_created_by.up.sql": _000010_blocks_created_byUpSql, + "000011_match_collation.down.sql": _000011_match_collationDownSql, + "000011_match_collation.up.sql": _000011_match_collationUpSql, + "000012_match_column_collation.down.sql": _000012_match_column_collationDownSql, + "000012_match_column_collation.up.sql": _000012_match_column_collationUpSql, + "000013_millisecond_timestamps.down.sql": _000013_millisecond_timestampsDownSql, + "000013_millisecond_timestamps.up.sql": _000013_millisecond_timestampsUpSql, } + // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the @@ -317,63 +722,89 @@ func AssetDir(name string) ([]string, error) { return nil, fmt.Errorf("Asset %s not found", name) } rv := make([]string, 0, len(node.Children)) - for name := range node.Children { - rv = append(rv, name) + for childName := range node.Children { + rv = append(rv, childName) } return rv, nil } -type _bintree_t struct { - Func func() ([]byte, error) - Children map[string]*_bintree_t +type bintree struct { + Func func() (*asset, error) + Children map[string]*bintree } -var _bintree = &_bintree_t{nil, map[string]*_bintree_t{ - "000001_init.down.sql": &_bintree_t{_000001_init_down_sql, map[string]*_bintree_t{ - }}, - "000001_init.up.sql": &_bintree_t{_000001_init_up_sql, map[string]*_bintree_t{ - }}, - "000002_system_settings_table.down.sql": &_bintree_t{_000002_system_settings_table_down_sql, map[string]*_bintree_t{ - }}, - "000002_system_settings_table.up.sql": &_bintree_t{_000002_system_settings_table_up_sql, map[string]*_bintree_t{ - }}, - "000003_blocks_rootid.down.sql": &_bintree_t{_000003_blocks_rootid_down_sql, map[string]*_bintree_t{ - }}, - "000003_blocks_rootid.up.sql": &_bintree_t{_000003_blocks_rootid_up_sql, map[string]*_bintree_t{ - }}, - "000004_auth_table.down.sql": &_bintree_t{_000004_auth_table_down_sql, map[string]*_bintree_t{ - }}, - "000004_auth_table.up.sql": &_bintree_t{_000004_auth_table_up_sql, map[string]*_bintree_t{ - }}, - "000005_blocks_modifiedby.down.sql": &_bintree_t{_000005_blocks_modifiedby_down_sql, map[string]*_bintree_t{ - }}, - "000005_blocks_modifiedby.up.sql": &_bintree_t{_000005_blocks_modifiedby_up_sql, map[string]*_bintree_t{ - }}, - "000006_sharing_table.down.sql": &_bintree_t{_000006_sharing_table_down_sql, map[string]*_bintree_t{ - }}, - "000006_sharing_table.up.sql": &_bintree_t{_000006_sharing_table_up_sql, map[string]*_bintree_t{ - }}, - "000007_workspaces_table.down.sql": &_bintree_t{_000007_workspaces_table_down_sql, map[string]*_bintree_t{ - }}, - "000007_workspaces_table.up.sql": &_bintree_t{_000007_workspaces_table_up_sql, map[string]*_bintree_t{ - }}, - "000008_teams.down.sql": &_bintree_t{_000008_teams_down_sql, map[string]*_bintree_t{ - }}, - "000008_teams.up.sql": &_bintree_t{_000008_teams_up_sql, map[string]*_bintree_t{ - }}, - "000009_blocks_history.down.sql": &_bintree_t{_000009_blocks_history_down_sql, map[string]*_bintree_t{ - }}, - "000009_blocks_history.up.sql": &_bintree_t{_000009_blocks_history_up_sql, map[string]*_bintree_t{ - }}, - "000010_blocks_created_by.down.sql": &_bintree_t{_000010_blocks_created_by_down_sql, map[string]*_bintree_t{ - }}, - "000010_blocks_created_by.up.sql": &_bintree_t{_000010_blocks_created_by_up_sql, map[string]*_bintree_t{ - }}, - "000011_match_collation.down.sql": &_bintree_t{_000011_match_collation_down_sql, map[string]*_bintree_t{ - }}, - "000011_match_collation.up.sql": &_bintree_t{_000011_match_collation_up_sql, map[string]*_bintree_t{ - }}, - "000012_match_column_collation.down.sql": &_bintree_t{_000012_match_column_collation_down_sql, map[string]*_bintree_t{ - }}, - "000012_match_column_collation.up.sql": &_bintree_t{_000012_match_column_collation_up_sql, map[string]*_bintree_t{ - }}, +var _bintree = &bintree{nil, map[string]*bintree{ + "000001_init.down.sql": &bintree{_000001_initDownSql, map[string]*bintree{}}, + "000001_init.up.sql": &bintree{_000001_initUpSql, map[string]*bintree{}}, + "000002_system_settings_table.down.sql": &bintree{_000002_system_settings_tableDownSql, map[string]*bintree{}}, + "000002_system_settings_table.up.sql": &bintree{_000002_system_settings_tableUpSql, map[string]*bintree{}}, + "000003_blocks_rootid.down.sql": &bintree{_000003_blocks_rootidDownSql, map[string]*bintree{}}, + "000003_blocks_rootid.up.sql": &bintree{_000003_blocks_rootidUpSql, map[string]*bintree{}}, + "000004_auth_table.down.sql": &bintree{_000004_auth_tableDownSql, map[string]*bintree{}}, + "000004_auth_table.up.sql": &bintree{_000004_auth_tableUpSql, map[string]*bintree{}}, + "000005_blocks_modifiedby.down.sql": &bintree{_000005_blocks_modifiedbyDownSql, map[string]*bintree{}}, + "000005_blocks_modifiedby.up.sql": &bintree{_000005_blocks_modifiedbyUpSql, map[string]*bintree{}}, + "000006_sharing_table.down.sql": &bintree{_000006_sharing_tableDownSql, map[string]*bintree{}}, + "000006_sharing_table.up.sql": &bintree{_000006_sharing_tableUpSql, map[string]*bintree{}}, + "000007_workspaces_table.down.sql": &bintree{_000007_workspaces_tableDownSql, map[string]*bintree{}}, + "000007_workspaces_table.up.sql": &bintree{_000007_workspaces_tableUpSql, map[string]*bintree{}}, + "000008_teams.down.sql": &bintree{_000008_teamsDownSql, map[string]*bintree{}}, + "000008_teams.up.sql": &bintree{_000008_teamsUpSql, map[string]*bintree{}}, + "000009_blocks_history.down.sql": &bintree{_000009_blocks_historyDownSql, map[string]*bintree{}}, + "000009_blocks_history.up.sql": &bintree{_000009_blocks_historyUpSql, map[string]*bintree{}}, + "000010_blocks_created_by.down.sql": &bintree{_000010_blocks_created_byDownSql, map[string]*bintree{}}, + "000010_blocks_created_by.up.sql": &bintree{_000010_blocks_created_byUpSql, map[string]*bintree{}}, + "000011_match_collation.down.sql": &bintree{_000011_match_collationDownSql, map[string]*bintree{}}, + "000011_match_collation.up.sql": &bintree{_000011_match_collationUpSql, map[string]*bintree{}}, + "000012_match_column_collation.down.sql": &bintree{_000012_match_column_collationDownSql, map[string]*bintree{}}, + "000012_match_column_collation.up.sql": &bintree{_000012_match_column_collationUpSql, map[string]*bintree{}}, + "000013_millisecond_timestamps.down.sql": &bintree{_000013_millisecond_timestampsDownSql, map[string]*bintree{}}, + "000013_millisecond_timestamps.up.sql": &bintree{_000013_millisecond_timestampsUpSql, map[string]*bintree{}}, }} + +// RestoreAsset restores an asset under the given directory +func RestoreAsset(dir, name string) error { + data, err := Asset(name) + if err != nil { + return err + } + info, err := AssetInfo(name) + if err != nil { + return err + } + err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755)) + if err != nil { + return err + } + err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) + if err != nil { + return err + } + err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime()) + if err != nil { + return err + } + return nil +} + +// RestoreAssets restores an asset under the given directory recursively +func RestoreAssets(dir, name string) error { + children, err := AssetDir(name) + // File + if err != nil { + return RestoreAsset(dir, name) + } + // Dir + for _, child := range children { + err = RestoreAssets(dir, filepath.Join(name, child)) + if err != nil { + return err + } + } + return nil +} + +func _filePath(dir, name string) string { + cannonicalName := strings.Replace(name, "\\", "/", -1) + return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...) +} + diff --git a/server/services/store/sqlstore/migrations/migrations_files/000013_millisecond_timestamps.down.sql b/server/services/store/sqlstore/migrations/migrations_files/000013_millisecond_timestamps.down.sql new file mode 100644 index 000000000..0ab3998f8 --- /dev/null +++ b/server/services/store/sqlstore/migrations/migrations_files/000013_millisecond_timestamps.down.sql @@ -0,0 +1,18 @@ + +UPDATE {{.prefix}}users SET create_at = create_at/1000, update_at = update_at/1000, delete_at = delete_at/1000 + WHERE create_at > 1000000000000; + +UPDATE {{.prefix}}blocks SET create_at = create_at/1000, update_at = update_at/1000, delete_at = delete_at/1000 + WHERE create_at > 1000000000000; + +UPDATE {{.prefix}}blocks_history SET create_at = create_at/1000, update_at = update_at/1000, delete_at = delete_at/1000 + WHERE create_at > 1000000000000; + +UPDATE {{.prefix}}workspaces SET update_at = update_at/1000 + WHERE update_at > 1000000000000; + +UPDATE {{.prefix}}sharing SET update_at = update_at/1000 + WHERE update_at > 1000000000000; + +UPDATE {{.prefix}}sessions SET create_at = create_at/1000, update_at = update_at/1000 + WHERE create_at > 1000000000000; diff --git a/server/services/store/sqlstore/migrations/migrations_files/000013_millisecond_timestamps.up.sql b/server/services/store/sqlstore/migrations/migrations_files/000013_millisecond_timestamps.up.sql new file mode 100644 index 000000000..461cb95b2 --- /dev/null +++ b/server/services/store/sqlstore/migrations/migrations_files/000013_millisecond_timestamps.up.sql @@ -0,0 +1,18 @@ + +UPDATE {{.prefix}}users SET create_at = create_at*1000, update_at = update_at*1000, delete_at = delete_at*1000 + WHERE create_at < 1000000000000; + +UPDATE {{.prefix}}blocks SET create_at = create_at*1000, update_at = update_at*1000, delete_at = delete_at*1000 + WHERE create_at < 1000000000000; + +UPDATE {{.prefix}}blocks_history SET create_at = create_at*1000, update_at = update_at*1000, delete_at = delete_at*1000 + WHERE create_at < 1000000000000; + +UPDATE {{.prefix}}workspaces SET update_at = update_at*1000 + WHERE update_at < 1000000000000; + +UPDATE {{.prefix}}sharing SET update_at = update_at*1000 + WHERE update_at < 1000000000000; + +UPDATE {{.prefix}}sessions SET create_at = create_at*1000, update_at = update_at*1000 + WHERE create_at < 1000000000000; diff --git a/server/services/store/sqlstore/session.go b/server/services/store/sqlstore/session.go index 6894ede25..1d41975dd 100644 --- a/server/services/store/sqlstore/session.go +++ b/server/services/store/sqlstore/session.go @@ -2,10 +2,10 @@ package sqlstore import ( "encoding/json" - "time" sq "github.com/Masterminds/squirrel" "github.com/mattermost/focalboard/server/model" + "github.com/mattermost/focalboard/server/utils" ) // GetActiveUserCount returns the number of users with active sessions within N seconds ago. @@ -13,7 +13,7 @@ func (s *SQLStore) GetActiveUserCount(updatedSecondsAgo int64) (int, error) { query := s.getQueryBuilder(). Select("count(distinct user_id)"). From(s.tablePrefix + "sessions"). - Where(sq.Gt{"update_at": time.Now().Unix() - updatedSecondsAgo}) + Where(sq.Gt{"update_at": utils.GetMillis() - utils.SecondsToMillis(updatedSecondsAgo)}) row := query.QueryRow() @@ -26,12 +26,12 @@ func (s *SQLStore) GetActiveUserCount(updatedSecondsAgo int64) (int, error) { return count, nil } -func (s *SQLStore) GetSession(token string, expireTime int64) (*model.Session, error) { +func (s *SQLStore) GetSession(token string, expireTimeSeconds int64) (*model.Session, error) { query := s.getQueryBuilder(). Select("id", "token", "user_id", "auth_service", "props"). From(s.tablePrefix + "sessions"). Where(sq.Eq{"token": token}). - Where(sq.Gt{"update_at": time.Now().Unix() - expireTime}) + Where(sq.Gt{"update_at": utils.GetMillis() - utils.SecondsToMillis(expireTimeSeconds)}) row := query.QueryRow() session := model.Session{} @@ -51,7 +51,7 @@ func (s *SQLStore) GetSession(token string, expireTime int64) (*model.Session, e } func (s *SQLStore) CreateSession(session *model.Session) error { - now := time.Now().Unix() + now := utils.GetMillis() propsBytes, err := json.Marshal(session.Props) if err != nil { @@ -67,7 +67,7 @@ func (s *SQLStore) CreateSession(session *model.Session) error { } func (s *SQLStore) RefreshSession(session *model.Session) error { - now := time.Now().Unix() + now := utils.GetMillis() query := s.getQueryBuilder().Update(s.tablePrefix+"sessions"). Where(sq.Eq{"token": session.Token}). @@ -78,7 +78,7 @@ func (s *SQLStore) RefreshSession(session *model.Session) error { } func (s *SQLStore) UpdateSession(session *model.Session) error { - now := time.Now().Unix() + now := utils.GetMillis() propsBytes, err := json.Marshal(session.Props) if err != nil { @@ -102,9 +102,9 @@ func (s *SQLStore) DeleteSession(sessionID string) error { return err } -func (s *SQLStore) CleanUpSessions(expireTime int64) error { +func (s *SQLStore) CleanUpSessions(expireTimeSeconds int64) error { query := s.getQueryBuilder().Delete(s.tablePrefix + "sessions"). - Where(sq.Lt{"update_at": time.Now().Unix() - expireTime}) + Where(sq.Lt{"update_at": utils.GetMillis() - utils.SecondsToMillis(expireTimeSeconds)}) _, err := query.Exec() return err diff --git a/server/services/store/sqlstore/sharing.go b/server/services/store/sqlstore/sharing.go index 65a05f4fc..fcb867a1f 100644 --- a/server/services/store/sqlstore/sharing.go +++ b/server/services/store/sqlstore/sharing.go @@ -1,16 +1,15 @@ package sqlstore import ( - "time" - "github.com/mattermost/focalboard/server/model" "github.com/mattermost/focalboard/server/services/store" + "github.com/mattermost/focalboard/server/utils" sq "github.com/Masterminds/squirrel" ) func (s *SQLStore) UpsertSharing(c store.Container, sharing model.Sharing) error { - now := time.Now().Unix() + now := utils.GetMillis() query := s.getQueryBuilder(). Insert(s.tablePrefix+"sharing"). diff --git a/server/services/store/sqlstore/user.go b/server/services/store/sqlstore/user.go index baadc2b87..19f28f52f 100644 --- a/server/services/store/sqlstore/user.go +++ b/server/services/store/sqlstore/user.go @@ -5,9 +5,9 @@ import ( "encoding/json" "fmt" "log" - "time" "github.com/mattermost/focalboard/server/model" + "github.com/mattermost/focalboard/server/utils" sq "github.com/Masterminds/squirrel" ) @@ -99,7 +99,7 @@ func (s *SQLStore) GetUserByUsername(username string) (*model.User, error) { } func (s *SQLStore) CreateUser(user *model.User) error { - now := time.Now().Unix() + now := utils.GetMillis() propsBytes, err := json.Marshal(user.Props) if err != nil { @@ -115,7 +115,7 @@ func (s *SQLStore) CreateUser(user *model.User) error { } func (s *SQLStore) UpdateUser(user *model.User) error { - now := time.Now().Unix() + now := utils.GetMillis() propsBytes, err := json.Marshal(user.Props) if err != nil { @@ -147,7 +147,7 @@ func (s *SQLStore) UpdateUser(user *model.User) error { } func (s *SQLStore) UpdateUserPassword(username, password string) error { - now := time.Now().Unix() + now := utils.GetMillis() query := s.getQueryBuilder().Update(s.tablePrefix+"users"). Set("password", password). @@ -172,7 +172,7 @@ func (s *SQLStore) UpdateUserPassword(username, password string) error { } func (s *SQLStore) UpdateUserPasswordByID(userID, password string) error { - now := time.Now().Unix() + now := utils.GetMillis() query := s.getQueryBuilder().Update(s.tablePrefix+"users"). Set("password", password). diff --git a/server/services/store/sqlstore/workspaces.go b/server/services/store/sqlstore/workspaces.go index 87902354d..522bb3c91 100644 --- a/server/services/store/sqlstore/workspaces.go +++ b/server/services/store/sqlstore/workspaces.go @@ -4,7 +4,6 @@ import ( "encoding/json" "errors" "fmt" - "time" "github.com/mattermost/focalboard/server/model" "github.com/mattermost/focalboard/server/utils" @@ -19,7 +18,7 @@ var ( ) func (s *SQLStore) UpsertWorkspaceSignupToken(workspace model.Workspace) error { - now := time.Now().Unix() + now := utils.GetMillis() query := s.getQueryBuilder(). Insert(s.tablePrefix+"workspaces"). @@ -50,7 +49,7 @@ func (s *SQLStore) UpsertWorkspaceSignupToken(workspace model.Workspace) error { } func (s *SQLStore) UpsertWorkspaceSettings(workspace model.Workspace) error { - now := time.Now().Unix() + now := utils.GetMillis() signupToken := utils.NewID(utils.IDTypeToken) settingsJSON, err := json.Marshal(workspace.Settings) diff --git a/server/services/store/storetests/blocks.go b/server/services/store/storetests/blocks.go index c87210fbc..4f4b30e1f 100644 --- a/server/services/store/storetests/blocks.go +++ b/server/services/store/storetests/blocks.go @@ -8,6 +8,7 @@ import ( "github.com/mattermost/focalboard/server/model" "github.com/mattermost/focalboard/server/services/store" + "github.com/mattermost/focalboard/server/utils" "github.com/stretchr/testify/require" ) @@ -168,8 +169,8 @@ func testInsertBlock(t *testing.T, store store.Store, container store.Container) ID: "id-10", RootID: "root-id", Title: "Old Title", - CreateAt: createdAt.Unix(), - UpdateAt: updateAt.Unix(), + CreateAt: utils.GetMillisForTime(createdAt), + UpdateAt: utils.GetMillisForTime(updateAt), CreatedBy: "user-id-5", ModifiedBy: "user-id-6", } @@ -183,8 +184,8 @@ func testInsertBlock(t *testing.T, store store.Store, container store.Container) assert.NotNil(t, retrievedBlock) assert.Equal(t, "user-id-1", retrievedBlock.CreatedBy) assert.Equal(t, "user-id-1", retrievedBlock.ModifiedBy) - assert.WithinDurationf(t, time.Now(), time.Unix(retrievedBlock.CreateAt/1000, 0), 1*time.Second, "create time should be current time") - assert.WithinDurationf(t, time.Now(), time.Unix(retrievedBlock.UpdateAt/1000, 0), 1*time.Second, "update time should be current time") + assert.WithinDurationf(t, time.Now(), utils.GetTimeForMillis(retrievedBlock.CreateAt), 1*time.Second, "create time should be current time") + assert.WithinDurationf(t, time.Now(), utils.GetTimeForMillis(retrievedBlock.UpdateAt), 1*time.Second, "update time should be current time") }) } @@ -653,8 +654,8 @@ func testGetBlock(t *testing.T, store store.Store, container store.Container) { require.Equal(t, "root-id-1", fetchedBlock.RootID) require.Equal(t, "user-id-1", fetchedBlock.CreatedBy) require.Equal(t, "user-id-1", fetchedBlock.ModifiedBy) - assert.WithinDurationf(t, time.Now(), time.Unix(fetchedBlock.CreateAt/1000, 0), 1*time.Second, "create time should be current time") - assert.WithinDurationf(t, time.Now(), time.Unix(fetchedBlock.UpdateAt/1000, 0), 1*time.Second, "update time should be current time") + assert.WithinDurationf(t, time.Now(), utils.GetTimeForMillis(fetchedBlock.CreateAt), 1*time.Second, "create time should be current time") + assert.WithinDurationf(t, time.Now(), utils.GetTimeForMillis(fetchedBlock.UpdateAt), 1*time.Second, "update time should be current time") }) t.Run("get a non-existing block", func(t *testing.T) { diff --git a/server/services/store/storetests/users.go b/server/services/store/storetests/users.go index bc43ea40e..fa3600301 100644 --- a/server/services/store/storetests/users.go +++ b/server/services/store/storetests/users.go @@ -58,7 +58,7 @@ func testGetWorkspaceUsers(t *testing.T, store store.Store) { defer func() { _ = store.UpdateUser(&model.User{ ID: userID, - DeleteAt: time.Now().Unix(), + DeleteAt: utils.GetMillis(), }) }() diff --git a/server/services/telemetry/telemetry.go b/server/services/telemetry/telemetry.go index fd1ff277f..0c343adf6 100644 --- a/server/services/telemetry/telemetry.go +++ b/server/services/telemetry/telemetry.go @@ -12,6 +12,7 @@ import ( rudder "github.com/rudderlabs/analytics-go" "github.com/mattermost/mattermost-server/v6/shared/mlog" + "github.com/mattermost/mattermost-server/v6/utils" ) const ( @@ -134,11 +135,11 @@ func (ts *Service) doTelemetryIfNeeded(firstRun time.Time) { } } -func (ts *Service) RunTelemetryJob(firstRun int64) { +func (ts *Service) RunTelemetryJob(firstRunMillis int64) { // Send on boot ts.doTelemetry() scheduler.CreateRecurringTask("Telemetry", func() { - ts.doTelemetryIfNeeded(time.Unix(0, firstRun*int64(time.Millisecond))) + ts.doTelemetryIfNeeded(utils.TimeFromMillis(firstRunMillis)) }, timeBetweenTelemetryChecks) } diff --git a/server/ws/plugin_adapter.go b/server/ws/plugin_adapter.go index dcb26e416..6b75a8116 100644 --- a/server/ws/plugin_adapter.go +++ b/server/ws/plugin_adapter.go @@ -11,6 +11,7 @@ import ( "github.com/mattermost/focalboard/server/auth" "github.com/mattermost/focalboard/server/model" "github.com/mattermost/focalboard/server/utils" + mmModel "github.com/mattermost/mattermost-server/v6/model" "github.com/mattermost/mattermost-server/v6/plugin" ) @@ -374,7 +375,7 @@ func (pa *PluginAdapter) BroadcastBlockChange(workspaceID string, block model.Bl } func (pa *PluginAdapter) BroadcastBlockDelete(workspaceID, blockID, parentID string) { - now := time.Now().Unix() + now := utils.GetMillis() block := model.Block{} block.ID = blockID block.ParentID = parentID diff --git a/server/ws/server.go b/server/ws/server.go index 276a26ecf..92efe9f43 100644 --- a/server/ws/server.go +++ b/server/ws/server.go @@ -4,13 +4,13 @@ import ( "encoding/json" "net/http" "sync" - "time" "github.com/gorilla/mux" "github.com/gorilla/websocket" "github.com/mattermost/focalboard/server/auth" "github.com/mattermost/focalboard/server/model" "github.com/mattermost/focalboard/server/services/store" + "github.com/mattermost/focalboard/server/utils" "github.com/mattermost/mattermost-server/v6/shared/mlog" ) @@ -464,7 +464,7 @@ func (ws *Server) getListenersForWorkspace(workspaceID string) []*wsClient { // BroadcastBlockDelete broadcasts delete messages to clients. func (ws *Server) BroadcastBlockDelete(workspaceID, blockID, parentID string) { - now := time.Now().Unix() + now := utils.GetMillis() block := model.Block{} block.ID = blockID block.ParentID = parentID