mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 19:17:32 +00:00
fix(setup): make step 39 repeatable (#9085)
# Which Problems Are Solved When downgrading zitadel and upgrading it again, it might be that orgs deleted in this period still have stale entries in the fields table. # How the Problems Are Solved - Make the cleanup repeatable - Scope the query by instance so that an index is used.
This commit is contained in:
@@ -3,6 +3,7 @@ WHERE aggregate_type = 'org'
|
||||
AND aggregate_id IN (
|
||||
SELECT aggregate_id
|
||||
FROM eventstore.events2
|
||||
WHERE aggregate_type = 'org'
|
||||
WHERE instance_id = $1
|
||||
AND aggregate_type = 'org'
|
||||
AND event_type = 'org.removed'
|
||||
);
|
||||
|
Reference in New Issue
Block a user