Initial commit: PastPaper Master full stack

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Zhao
2026-04-21 12:15:35 +07:00
commit 7a09167261
105 changed files with 24799 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
-- ============================================
-- PastPaper Master — Allow legacy long_question format alias
-- Version: 005
-- Date: 2026-03-24
-- ============================================
--
-- Some existing seeds and older generated SQL used `long_question` in the
-- `question_format` column, while the 003 taxonomy migration introduced
-- `long_answer` as the canonical value. Allow both temporarily so historical
-- inserts do not fail. New generators should continue emitting `long_answer`.
ALTER TABLE paper_questions
DROP CONSTRAINT IF EXISTS paper_questions_question_format_check;
ALTER TABLE paper_questions
ADD CONSTRAINT paper_questions_question_format_check
CHECK (
question_format IN (
'mc',
'true_false',
'fill_blank',
'short_answer',
'long_answer',
'long_question',
'coding'
)
);