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.
This commit is contained in:
Jakub Zych
2026-10-22 03:02:08 +02:00
parent 9986342c23
commit 499b6dc408
2 changed files with 8 additions and 8 deletions

View File

@@ -54,8 +54,8 @@ func TestUserGroupsMigration(t *testing.T) {
t.Fatalf("users_groups primary key = %q", pk) t.Fatalf("users_groups primary key = %q", pk)
} }
// Handle, OAuth identities, frontend permissions, last seen, API tokens, user permissions, then user groups. // Email verified at, handle, OAuth identities, frontend permissions, last seen, API tokens, user permissions, then user groups.
for range 7 { for range 8 {
if err := m.RollbackLast(); err != nil { if err := m.RollbackLast(); err != nil {
t.Fatal(err) t.Fatal(err)
} }

View File

@@ -47,9 +47,9 @@ func TestExtendUsersMigration(t *testing.T) {
if !row.HasSelfSetPassword || row.IsActivated || row.MarketingConsent || row.IsOnboarded { if !row.HasSelfSetPassword || row.IsActivated || row.MarketingConsent || row.IsOnboarded {
t.Fatalf("defaults = %+v", row) 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. // throttle, then extend-users.
for range 10 { for range 11 {
if err := m.RollbackLast(); err != nil { if err := m.RollbackLast(); err != nil {
t.Fatal(err) t.Fatal(err)
} }
@@ -88,8 +88,8 @@ func TestCreateUserThrottleMigration(t *testing.T) {
t.Fatalf("missing column %s", col) t.Fatalf("missing column %s", col)
} }
} }
// Handle, OAuth identities, the three admin migrations, API tokens, user groups, jwt blacklist, then throttle. // Email verified at, handle, OAuth identities, the three admin migrations, API tokens, user groups, jwt blacklist, then throttle.
for range 9 { for range 10 {
if err := m.RollbackLast(); err != nil { if err := m.RollbackLast(); err != nil {
t.Fatal(err) t.Fatal(err)
} }
@@ -120,8 +120,8 @@ func TestCreateJwtBlacklistMigration(t *testing.T) {
t.Fatalf("missing column %s", col) t.Fatalf("missing column %s", col)
} }
} }
// Handle, OAuth identities, the three admin migrations, API tokens, user groups, then jwt blacklist. // Email verified at, handle, OAuth identities, the three admin migrations, API tokens, user groups, then jwt blacklist.
for range 8 { for range 9 {
if err := m.RollbackLast(); err != nil { if err := m.RollbackLast(); err != nil {
t.Fatal(err) t.Fatal(err)
} }