mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
fix(admin): repair system maintenance controls
Implement server-side searchable user filtering for usage records, including backend search parameters and a shared frontend selector with loading, empty, and pinned-selected states. Fix announcement deletion by cascading announcement read rows through a Postgres migration and defensive repository cleanup across supported backends. Wire admin system purge and cleanup endpoints to real data deletion/maintenance flows, improve DataManagement messages, rebuild stats after stats purge, and add runtime OAuth token refresh maintenance when enabled. Verified with rust-ci equivalent checks: cargo fmt, split clippy, split cargo tests, SQLite/Postgres/MySQL smoke tests, plus frontend npm ci, build, pages build, type-check, and targeted usage selector tests.
This commit is contained in:
@@ -3774,7 +3774,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS uq_dimension_collectors_enabled ON public.dime
|
||||
|
||||
DO $mig$ BEGIN
|
||||
ALTER TABLE ONLY public.announcement_reads
|
||||
ADD CONSTRAINT announcement_reads_announcement_id_fkey FOREIGN KEY (announcement_id) REFERENCES public.announcements(id);
|
||||
ADD CONSTRAINT announcement_reads_announcement_id_fkey FOREIGN KEY (announcement_id) REFERENCES public.announcements(id) ON DELETE CASCADE;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN NULL;
|
||||
WHEN duplicate_table THEN NULL;
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
ALTER TABLE IF EXISTS public.announcement_reads
|
||||
DROP CONSTRAINT IF EXISTS announcement_reads_announcement_id_fkey;
|
||||
|
||||
ALTER TABLE IF EXISTS public.announcement_reads
|
||||
ADD CONSTRAINT announcement_reads_announcement_id_fkey
|
||||
FOREIGN KEY (announcement_id)
|
||||
REFERENCES public.announcements(id)
|
||||
ON DELETE CASCADE;
|
||||
Reference in New Issue
Block a user