Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: filter deleted revision (#15000)

p0nyd7fb7d5411bf
diff --git a/backend/store/database.go b/backend/store/database.go
index c0f2d852ea..208d96d11e 100644
--- a/backend/store/database.go
+++ b/backend/store/database.go
@@ -514,7 +514,7 @@ func (*Store) listDatabaseImplV2(ctx context.Context, tx *Tx, find *FindDatabase
(
SELECT revision.version
FROM revision
- WHERE revision.database_id = db.id
+ WHERE revision.database_id = db.id AND deleted_ts IS NOT NULL
ORDER BY revision.version DESC
LIMIT 1
),