feat: import scorelines and videos

This commit is contained in:
Codex
2026-06-29 06:40:42 +08:00
parent fc289f7b42
commit 4954ad3ca9
16 changed files with 1397 additions and 64 deletions

View File

@@ -0,0 +1,42 @@
alter table public.video_explanations
add column if not exists source_hash text,
add column if not exists metadata jsonb not null default '{}'::jsonb;
alter table public.question_videos
add column if not exists metadata jsonb not null default '{}'::jsonb;
alter table public.scoreline_fields
add column if not exists source_hash text,
add column if not exists metadata jsonb not null default '{}'::jsonb;
alter table public.scoreline_schools
add column if not exists source_hash text,
add column if not exists metadata jsonb not null default '{}'::jsonb;
alter table public.scoreline_majors
add column if not exists source_hash text,
add column if not exists metadata jsonb not null default '{}'::jsonb;
alter table public.scoreline_records
add column if not exists source_hash text,
add column if not exists metadata jsonb not null default '{}'::jsonb;
create index if not exists idx_video_explanations_source_hash
on public.video_explanations(tenant_id, source_hash)
where source_hash is not null;
create index if not exists idx_scoreline_fields_source_hash
on public.scoreline_fields(tenant_id, source_hash)
where source_hash is not null;
create index if not exists idx_scoreline_schools_source_hash
on public.scoreline_schools(tenant_id, source_hash)
where source_hash is not null;
create index if not exists idx_scoreline_majors_source_hash
on public.scoreline_majors(tenant_id, source_hash)
where source_hash is not null;
create index if not exists idx_scoreline_records_source_hash
on public.scoreline_records(tenant_id, source_hash)
where source_hash is not null;