perf: sync protocol and core hardening updates
This commit is contained in:
parent
152fed3b87
commit
4390ebf5a9
283 changed files with 29231 additions and 2295 deletions
20
deploy/migrations/0064_user_update_retention.down.sql
Normal file
20
deploy/migrations/0064_user_update_retention.down.sql
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
-- TDesktop has no account-level differenceTooLong fallback. If any confirmed prefix has already
|
||||
-- been deleted, removing this floor/observed state would turn a durable history hole into a false
|
||||
-- empty difference. A rollback is safe only before retention has advanced anywhere.
|
||||
DO $$
|
||||
BEGIN
|
||||
IF EXISTS (
|
||||
SELECT 1
|
||||
FROM public.user_update_retention
|
||||
WHERE retained_through_pts > 0
|
||||
) THEN
|
||||
RAISE EXCEPTION
|
||||
'cannot roll back user update retention: retained floor has advanced'
|
||||
USING ERRCODE = '55000';
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
|
||||
DROP INDEX IF EXISTS public.user_update_events_retention_global_idx;
|
||||
DROP TABLE IF EXISTS public.user_update_retention;
|
||||
ALTER TABLE public.update_states DROP COLUMN IF EXISTS observed_pts;
|
||||
Loading…
Add table
Add a link
Reference in a new issue