From ad8fa03503303be8f4daaad3ac39b6b4fc9e4bd3 Mon Sep 17 00:00:00 2001 From: Pancakes Date: Tue, 29 Oct 2024 21:18:38 -0400 Subject: [PATCH] Migrate all local accounts --- api/daily/common.go | 2 +- db/savedata.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/daily/common.go b/api/daily/common.go index 187db34..a3bc753 100644 --- a/api/daily/common.go +++ b/api/daily/common.go @@ -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) } diff --git a/db/savedata.go b/db/savedata.go index e5de022..6b5b4b0 100644 --- a/db/savedata.go +++ b/db/savedata.go @@ -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 }