mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-22 16:41:28 +08:00
Migrate all local accounts
This commit is contained in:
parent
e432d64acb
commit
ad8fa03503
@ -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)
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user