一句话录入,自动拆成整单信息
填写 Supabase 项目信息后,新增、编辑、删除都会实时写入云端;其他设备打开同一份页面,会自动拉取最新记录。
create table if not exists dispatch_records ( id text primary key, content text, org text, contact text, phone text, date text, time_text text, precision text, location text, vehicle text, shooters jsonb default '[]'::jsonb, producers jsonb default '[]'::jsonb, progress text default '待制作', remark text, important boolean default false, raw text, created_at bigint, updated_at bigint ); alter table dispatch_records add column if not exists progress text default '待制作'; alter table dispatch_records add column if not exists org text; alter table dispatch_records add column if not exists remark text; alter table dispatch_records add column if not exists important boolean default false; alter table dispatch_records add column if not exists vehicle text; alter table dispatch_records enable row level security; create policy "dispatch_all" on dispatch_records for all to anon using (true) with check (true); -- 备份表:表名 = 主表名 + _backups create table if not exists dispatch_records_backups ( id text primary key, ts bigint, tag text, n int, payload jsonb, created_at bigint ); alter table dispatch_records_backups enable row level security; create policy "dispatch_records_backups_all" on dispatch_records_backups for all to anon using (true) with check (true);
快照分两处:云端自动留(新增、修改、删除时生成,最多 8 份,换设备也能还原);本机只在你点「立即备份」时留一份,最多 8 份。也可导出文件另存,或从文件导入合并。