diff options
author | Robin Appelman <robin@icewind.nl> | 2021-10-15 15:15:56 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-10-15 15:35:19 +0200 |
commit | 34637697e1310728d138aa4386f890dfc4ffd288 (patch) | |
tree | 3ed9ecddb1c130b8856dfd03271321153f1b1533 /apps/files_external/lib/Lib/Storage | |
parent | d3bd0b5a1bfd8125866a9a86cbb05d3d2c6e14bb (diff) | |
download | nextcloud-server-34637697e1310728d138aa4386f890dfc4ffd288.tar.gz nextcloud-server-34637697e1310728d138aa4386f890dfc4ffd288.zip |
remove old migration method
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/lib/Lib/Storage')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index c4c82c6a879..9c7d6a554b3 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -213,37 +213,6 @@ class AmazonS3 extends \OC\Files\Storage\Common { } /** - * Updates old storage ids (v0.2.1 and older) that are based on key and secret to new ones based on the bucket name. - * TODO Do this in a repair step. requires iterating over all users and loading the mount.json from their home - * - * @param array $params - */ - public function updateLegacyId(array $params) { - $oldId = 'amazon::' . $params['key'] . md5($params['secret']); - - // find by old id or bucket - $stmt = \OC::$server->getDatabaseConnection()->prepare( - 'SELECT `numeric_id`, `id` FROM `*PREFIX*storages` WHERE `id` IN (?, ?)' - ); - $stmt->execute([$oldId, $this->id]); - while ($row = $stmt->fetch()) { - $storages[$row['id']] = $row['numeric_id']; - } - - if (isset($storages[$this->id]) && isset($storages[$oldId])) { - // if both ids exist, delete the old storage and corresponding filecache entries - \OC\Files\Cache\Storage::remove($oldId); - } elseif (isset($storages[$oldId])) { - // if only the old id exists do an update - $stmt = \OC::$server->getDatabaseConnection()->prepare( - 'UPDATE `*PREFIX*storages` SET `id` = ? WHERE `id` = ?' - ); - $stmt->execute([$this->id, $oldId]); - } - // only the bucket based id may exist, do nothing - } - - /** * Remove a file or folder * * @param string $path |