diff --git a/packages/api/db/tables.sql b/packages/api/db/tables.sql index c04c0dd172..5a4c5f7478 100644 --- a/packages/api/db/tables.sql +++ b/packages/api/db/tables.sql @@ -193,9 +193,8 @@ select akh.reason as reason, akh.status as status from public.user u -right join auth_key ak on ak.user_id = u.id -full outer join (select * from auth_key_history where deleted_at is null) as akh on akh.auth_key_id = ak.id -where ak.deleted_at is NULL or ak.deleted_at is not NULL and akh.status is not NULL; +full outer join auth_key ak on ak.user_id = u.id +full outer join (select * from auth_key_history where deleted_at is null) as akh on akh.auth_key_id = ak.id; CREATE INDEX IF NOT EXISTS upload_content_cid_idx ON upload (content_cid); CREATE INDEX IF NOT EXISTS upload_source_cid_idx ON upload (source_cid);