mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 11:27:33 +00:00
fix: fix and improve primary keys on projections (#3708)
* fix: org_domain projection * fix: projection reset * fix test * improve foreign keys on suffixed tables
This commit is contained in:
@@ -21,6 +21,7 @@ var _ system.SystemServiceServer = (*Server)(nil)
|
||||
|
||||
type Server struct {
|
||||
system.UnimplementedSystemServiceServer
|
||||
database string
|
||||
command *command.Commands
|
||||
query *query.Queries
|
||||
administrator repository.AdministratorRepository
|
||||
@@ -34,12 +35,14 @@ type Config struct {
|
||||
func CreateServer(command *command.Commands,
|
||||
query *query.Queries,
|
||||
repo repository.Repository,
|
||||
database string,
|
||||
defaultInstance command.InstanceSetup,
|
||||
) *Server {
|
||||
return &Server{
|
||||
command: command,
|
||||
query: query,
|
||||
administrator: repo,
|
||||
database: database,
|
||||
DefaultInstance: defaultInstance,
|
||||
}
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ func (s *Server) ListViews(ctx context.Context, _ *system_pb.ListViewsRequest) (
|
||||
|
||||
func (s *Server) ClearView(ctx context.Context, req *system_pb.ClearViewRequest) (*system_pb.ClearViewResponse, error) {
|
||||
var err error
|
||||
if req.Database != "zitadel" {
|
||||
if req.Database != s.database {
|
||||
err = s.administrator.ClearView(ctx, req.Database, req.ViewName)
|
||||
} else {
|
||||
err = s.query.ClearCurrentSequence(ctx, req.ViewName)
|
||||
|
Reference in New Issue
Block a user