mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
Speed up user pagination query
This commit is contained in:
@ -24,7 +24,8 @@ type Migrator_1_314_0_PR_1841 struct{}
|
||||
func (*Migrator_1_314_0_PR_1841) IsMigrationNeeded() bool {
|
||||
count, err := adapter.Engine.Where("password_type=?", "").Count(&User{})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
// table doesn't exist
|
||||
return false
|
||||
}
|
||||
|
||||
return count > 100
|
||||
|
Reference in New Issue
Block a user