Skip to content

Commit

Permalink
Migrate all local accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
patapancakes committed Oct 30, 2024
1 parent e432d64 commit ad8fa03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/daily/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func S3SaveMigration() error {
}

// retrieve accounts from db
accounts, err := db.RetrieveOldAccounts()
accounts, err := db.GetLocalAccounts()
if err != nil {
return fmt.Errorf("failed to retrieve old accounts: %s", err)
}
Expand Down
4 changes: 2 additions & 2 deletions db/savedata.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ func GetSystemSaveFromS3(uuid []byte) (defs.SystemSaveData, error) {
return session, nil
}

func RetrieveOldAccounts() ([][]byte, error) {
func GetLocalAccounts() ([][]byte, error) {
var users [][]byte
rows, err := handle.Query("SELECT uuid FROM accounts WHERE isInLocalDb = 1 AND lastActivity < DATE_SUB(NOW(), INTERVAL 3 MONTH) LIMIT 3000")
rows, err := handle.Query("SELECT uuid FROM accounts WHERE isInLocalDb = 1) LIMIT 3000")
if err != nil {
return nil, err
}
Expand Down

0 comments on commit ad8fa03

Please sign in to comment.