From 499b6dc408aff7ba014c831a1d14fd85bac0b02e Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Thu, 22 Oct 2026 03:02:08 +0200 Subject: [PATCH] test: migration rollback counts include the email_verified_at migration The rollback tests of user groups, extend-users, throttle and jwt blacklist stopped one migration short since 202610210001 was added. --- updates/user_groups_test.go | 4 ++-- updates/user_session_test.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/updates/user_groups_test.go b/updates/user_groups_test.go index 29446a5..968211c 100644 --- a/updates/user_groups_test.go +++ b/updates/user_groups_test.go @@ -54,8 +54,8 @@ func TestUserGroupsMigration(t *testing.T) { t.Fatalf("users_groups primary key = %q", pk) } - // Handle, OAuth identities, frontend permissions, last seen, API tokens, user permissions, then user groups. - for range 7 { + // Email verified at, handle, OAuth identities, frontend permissions, last seen, API tokens, user permissions, then user groups. + for range 8 { if err := m.RollbackLast(); err != nil { t.Fatal(err) } diff --git a/updates/user_session_test.go b/updates/user_session_test.go index 4e8fcc1..cc5fe3f 100644 --- a/updates/user_session_test.go +++ b/updates/user_session_test.go @@ -47,9 +47,9 @@ func TestExtendUsersMigration(t *testing.T) { if !row.HasSelfSetPassword || row.IsActivated || row.MarketingConsent || row.IsOnboarded { t.Fatalf("defaults = %+v", row) } - // Handle, OAuth identities, the three admin migrations, API tokens, user groups, jwt blacklist, + // Email verified at, handle, OAuth identities, the three admin migrations, API tokens, user groups, jwt blacklist, // throttle, then extend-users. - for range 10 { + for range 11 { if err := m.RollbackLast(); err != nil { t.Fatal(err) } @@ -88,8 +88,8 @@ func TestCreateUserThrottleMigration(t *testing.T) { t.Fatalf("missing column %s", col) } } - // Handle, OAuth identities, the three admin migrations, API tokens, user groups, jwt blacklist, then throttle. - for range 9 { + // Email verified at, handle, OAuth identities, the three admin migrations, API tokens, user groups, jwt blacklist, then throttle. + for range 10 { if err := m.RollbackLast(); err != nil { t.Fatal(err) } @@ -120,8 +120,8 @@ func TestCreateJwtBlacklistMigration(t *testing.T) { t.Fatalf("missing column %s", col) } } - // Handle, OAuth identities, the three admin migrations, API tokens, user groups, then jwt blacklist. - for range 8 { + // Email verified at, handle, OAuth identities, the three admin migrations, API tokens, user groups, then jwt blacklist. + for range 9 { if err := m.RollbackLast(); err != nil { t.Fatal(err) }