addition of new dashboard

This commit is contained in:
2026-08-20 15:08:32 +00:00
parent 0622018d95
commit bf59249ed7
161 changed files with 13170 additions and 119 deletions

View File

@@ -0,0 +1,14 @@
-- Per-tenant read-through cache; updated_ts drives TTL freshness.
CREATE TABLE IF NOT EXISTS public.cache (
id BIGSERIAL PRIMARY KEY,
user_id BIGINT NOT NULL REFERENCES public.user(id),
tag TEXT NOT NULL,
data JSONB NOT NULL,
created_ts TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_ts TIMESTAMPTZ NOT NULL DEFAULT NOW(),
CONSTRAINT uniq__cache__user_id_tag UNIQUE (user_id, tag)
);
CREATE INDEX IF NOT EXISTS idx__public__cache__user_id ON public.cache (user_id);
CREATE INDEX IF NOT EXISTS idx__public__cache__tag ON public.cache (tag);
CREATE INDEX IF NOT EXISTS idx__public__cache__created_ts ON public.cache (created_ts);
CREATE INDEX IF NOT EXISTS idx__public__cache__updated_ts ON public.cache (updated_ts);