feat(server/migrate): 000026 notices 表 + users.notices_read_at 已读水位

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P9G7E3wmAYL9KeYCVZVsqu
This commit is contained in:
wangjia
2026-07-13 13:32:23 +08:00
parent 0657a830d0
commit 21a30aa4c8
6 changed files with 51 additions and 8 deletions
@@ -104,11 +104,14 @@ func TestCodesLibMigrateRoundTrip(t *testing.T) {
// the reviewer's repro hit: the lib's `codes` table collides with the
// name 000022's down script renames legacy_codes back to.
m := newSQLiteStepper(t, db)
// 000025 (user_device_limit_override), 000024 (invite_rewards) and 000023
// (pay_purchases/source-enum) now sit on top of 000022
// (codes_lib_legacy_rename) and are unrelated to this collision — step
// them back down first so we land exactly on the 000022 boundary the
// test targets.
// 000026 (notices), 000025 (user_device_limit_override), 000024
// (invite_rewards) and 000023 (pay_purchases/source-enum) now sit on top
// of 000022 (codes_lib_legacy_rename) and are unrelated to this
// collision — step them back down first so we land exactly on the
// 000022 boundary the test targets.
if err := m.Steps(-1); err != nil {
t.Fatalf("step 000026 down: %v", err)
}
if err := m.Steps(-1); err != nil {
t.Fatalf("step 000025 down: %v", err)
}