chore: add check for sqlite cascades before changing user id

This commit is contained in:
Ferdinand Mütsch
2025-02-02 21:56:22 +01:00
parent 2fef990d96
commit 8bd23c99ae
18 changed files with 1072 additions and 873 deletions

View File

@@ -6,6 +6,7 @@ import (
)
type AliasRepositoryMock struct {
BaseRepositoryMock
mock.Mock
}

24
mocks/base_repository.go Normal file
View File

@@ -0,0 +1,24 @@
package mocks
import (
"github.com/stretchr/testify/mock"
)
type BaseRepositoryMock struct {
mock.Mock
}
func (m *BaseRepositoryMock) GetDialector() string {
args := m.Called()
return args.Get(0).(string)
}
func (m *BaseRepositoryMock) GetTableDDLMysql(s string) (string, error) {
args := m.Called(s)
return args.Get(0).(string), args.Error(1)
}
func (m *BaseRepositoryMock) GetTableDDLSqlite(s string) (string, error) {
args := m.Called(s)
return args.Get(0).(string), args.Error(1)
}

View File

@@ -7,6 +7,7 @@ import (
)
type SummaryRepositoryMock struct {
BaseRepositoryMock
mock.Mock
}