-- ============================================= -- Education 模块 — 错题本 DDL Rollback -- Migration: 005 -- ============================================= -- IMPORTANT: This is a documentation-only rollback. -- No DROP/ALTER/DELETE statements are executed. The wrong_question -- table is provenance-safe: it only accumulates data and mastering -- is a status flag. Dropping these tables would lose student error -- history with no recovery path. -- -- What this migration created: -- - education_wrong_question (new table) -- - education_wrong_question_idempotency (new table) -- - education_practice_report_detail.options (new column) -- - education_practice_session.review_fingerprint (new column) -- -- Manual rollback requires: -- 1. Verified database backup before rollback -- 2. Operator approval (DBA sign-off) -- 3. Provenance of all wrong-question records preserved (exported) -- 4. Soft-delete via deleted = true before any hard drop -- -- These tables are NOT deleted by this script. Wrong history is -- retained; if deletion is required by external policy, consult -- the DBA for a verified rollback procedure.