Files
Jyotisha/frontend/supabase/migrations/20260921010000_retire_chat_session_archive.sql
T
jesse-ux 5a4b87383f
Independent Staging Quality Gate / validate (push) Failing after 6m35s
Independent Staging Quality Gate / publish (push) Skipped
fix(web): retire session archive UI and API, restore archived rows
Remove archive/restore from the session menu and drop archived=1 listing. PATCH still accepts archived_at from old bundles then ignores it. A forward migration clears archived_at without bumping updated_at. Delete stays unchanged.
2026-09-21 18:49:40 +08:00

21 lines
484 B
PL/PgSQL

-- BUG-991: put archived sessions back on the live list.
-- Keep archived_at for a later drop (AGENTS.md §7.6). Do not bump updated_at
-- (BUG-988). Idempotent: a second run matches 0 rows.
begin;
do $migration$
begin
if current_user <> 'schema_owner' then
raise exception 'retire_chat_session_archive_requires_schema_owner'
using errcode = '42501';
end if;
end
$migration$;
update public.chat_sessions
set archived_at = null
where archived_at is not null;
commit;