go-guess/backend/migrations/00005_question_code_snippet.sql
Daniel Noulet 6153017b62 review
2026-09-19 20:56:27 +02:00

10 lines
379 B
SQL

-- +goose Up
ALTER TABLE questions
ADD COLUMN code_snippet TEXT NOT NULL DEFAULT '';
UPDATE questions
SET code_snippet = E'function CandidateList({ candidates }) {\n return candidates.map(candidate => (\n <CandidateCard candidate={candidate} />\n ));\n}'
WHERE type = 'code_review' AND code_snippet = '';
-- +goose Down
ALTER TABLE questions DROP COLUMN code_snippet;