Spaces:
Sleeping
Sleeping
Download comprehension_migration.sql from refaelz/legacy-code-challenge-v2: direct link, hf CLI and curl.
- Browser
- Download file 985 Bytes
-
https://huggingface.co/spaces/refaelz/legacy-code-challenge-v2/resolve/main/comprehension_migration.sql
- Command line
-
hf download hf://spaces/refaelz/legacy-code-challenge-v2/comprehension_migration.sql
-
curl -L -o comprehension_migration.sql https://huggingface.co/spaces/refaelz/legacy-code-challenge-v2/resolve/main/comprehension_migration.sql
985 Bytes
| -- Apply before deploying the comprehension API. Existing rounds remain legacy. | |
| alter table public.challenge_rounds add column if not exists comprehension_question text; | |
| alter table public.challenge_rounds add column if not exists comprehension_model_answer text; | |
| alter table public.submissions add column if not exists comprehension_answer text; | |
| alter table public.submissions add column if not exists comprehension_grade integer check (comprehension_grade between 0 and 2); | |
| alter table public.submissions add column if not exists comprehension_graded_at timestamptz; | |
| alter table public.challenge_rounds enable row level security; | |
| revoke all on table public.challenge_rounds from anon, authenticated; | |
| grant select, insert, update, delete on table public.challenge_rounds to service_role; | |
| alter table public.submissions enable row level security; | |
| revoke all on table public.submissions from anon, authenticated; | |
| grant select, insert, update on table public.submissions to service_role; |