开始记录你的观影轨迹
可通过 TMDB 联网导入影视资料,也可以手动添加。评分、状态、整部观后感和每集心得都会保存到本地并同步云端。
可通过 TMDB 联网导入影视资料,也可以手动添加。评分、状态、整部观后感和每集心得都会保存到本地并同步云端。
在 Supabase SQL Editor 执行一次后,私人数据即可按 UID 绑定同步。
create table if not exists public.lext_trace_records (
id text primary key,
user_id uuid not null references auth.users(id) on delete cascade default auth.uid(),
title text not null default 'Oltrace 观影记录',
records_data jsonb,
storage_bytes bigint not null default 0,
deleted_at timestamptz,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);
alter table public.lext_trace_records enable row level security;
create index if not exists lext_trace_records_user_deleted_updated_idx
on public.lext_trace_records (user_id, deleted_at, updated_at desc);
drop policy if exists "Users can view their own Oltrace records." on public.lext_trace_records;
create policy "Users can view their own Oltrace records." on public.lext_trace_records for select to authenticated using ((select auth.uid()) = user_id);
drop policy if exists "Users can create their own Oltrace records." on public.lext_trace_records;
create policy "Users can create their own Oltrace records." on public.lext_trace_records for insert to authenticated with check ((select auth.uid()) = user_id);
drop policy if exists "Users can update their own Oltrace records." on public.lext_trace_records;
create policy "Users can update their own Oltrace records." on public.lext_trace_records for update to authenticated using ((select auth.uid()) = user_id) with check ((select auth.uid()) = user_id);
drop policy if exists "Users can delete their own Oltrace records." on public.lext_trace_records;
create policy "Users can delete their own Oltrace records." on public.lext_trace_records for delete to authenticated using ((select auth.uid()) = user_id);