Migrate all local accounts

master
Pancakes 2 weeks ago
parent e432d64acb
commit ad8fa03503
No known key found for this signature in database
GPG Key ID: 5792877BFA27DC8F

@ -132,7 +132,7 @@ func S3SaveMigration() error {
} }
// retrieve accounts from db // retrieve accounts from db
accounts, err := db.RetrieveOldAccounts() accounts, err := db.GetLocalAccounts()
if err != nil { if err != nil {
return fmt.Errorf("failed to retrieve old accounts: %s", err) return fmt.Errorf("failed to retrieve old accounts: %s", err)
} }

@ -259,9 +259,9 @@ func GetSystemSaveFromS3(uuid []byte) (defs.SystemSaveData, error) {
return session, nil return session, nil
} }
func RetrieveOldAccounts() ([][]byte, error) { func GetLocalAccounts() ([][]byte, error) {
var users [][]byte 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 { if err != nil {
return nil, err return nil, err
} }

Loading…
Cancel
Save