feat(education): complete Flyway migration and atomic submit

This commit is contained in:
2026-07-30 12:06:55 +08:00
parent ce02f8acb4
commit 79a5799502
228 changed files with 32551 additions and 1376 deletions

View File

@@ -0,0 +1,25 @@
-- =============================================
-- Education 模块 — 收藏夹 DDL Rollback (PostgreSQL)
-- Migration: 007
-- =============================================
-- IMPORTANT: This is a documentation-only rollback.
-- No DROP/ALTER/DELETE statements are executed. The favorite
-- table is provenance-safe: it only accumulates user preference
-- data. Dropping this table would lose student favorites with
-- no recovery path.
--
-- What this migration created:
-- - education_favorite (new table)
-- - idx_tenant_user (index)
-- - idx_tenant_user_target_type (index)
-- - uk_tenant_user_target (unique constraint)
--
-- Manual rollback requires:
-- 1. Verified database backup before rollback
-- 2. Operator approval (DBA sign-off)
-- 3. Provenance of all favorite records preserved (exported)
-- 4. Soft-delete via deleted = true before any hard drop
--
-- These tables are NOT deleted by this script. Favorite history is
-- retained; if deletion is required by external policy, consult
-- the DBA for a verified rollback procedure.