From 58f6238af268db46b37a9c28c90d01944f6e6c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 20 Nov 2020 15:38:59 +0100 Subject: [PATCH] Move columns to bigint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .../lib/Migration/Version1010Date20200630191755.php | 3 +-- .../lib/Migration/Version11300Date20201120141438.php | 5 ++--- apps/settings/lib/Controller/CheckSetupController.php | 2 ++ core/Command/Db/ConvertFilecacheBigInt.php | 2 ++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php index b8d498f322..7376c8d9e7 100644 --- a/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php +++ b/apps/federatedfilesharing/lib/Migration/Version1010Date20200630191755.php @@ -44,9 +44,8 @@ class Version1010Date20200630191755 extends SimpleMigrationStep { if (!$schema->hasTable('federated_reshares')) { $table = $schema->createTable('federated_reshares'); - $table->addColumn('share_id', Types::INTEGER, [ + $table->addColumn('share_id', Types::BIGINT, [ 'notnull' => true, - 'length' => 4, ]); $table->addColumn('remote_id', Types::STRING, [ 'notnull' => true, diff --git a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php index 84c8721dec..6183324982 100644 --- a/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php +++ b/apps/files_sharing/lib/Migration/Version11300Date20201120141438.php @@ -18,11 +18,11 @@ class Version11300Date20201120141438 extends SimpleMigrationStep { if (!$schema->hasTable('share_external')) { $table = $schema->createTable('share_external'); - $table->addColumn('id', Types::INTEGER, [ + $table->addColumn('id', Types::BIGINT, [ 'autoincrement' => true, 'notnull' => true, ]); - $table->addColumn('parent', Types::INTEGER, [ + $table->addColumn('parent', Types::BIGINT, [ 'notnull' => false, 'default' => -1, ]); @@ -86,5 +86,4 @@ class Version11300Date20201120141438 extends SimpleMigrationStep { return $schema; } - } diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index 8a0536c29f..19d932ecc4 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -630,12 +630,14 @@ Raw output 'activity_mq' => ['mail_id'], 'authtoken' => ['id'], 'bruteforce_attempts' => ['id'], + 'federated_reshares' => ['share_id'], 'filecache' => ['fileid', 'storage', 'parent', 'mimetype', 'mimepart', 'mtime', 'storage_mtime'], 'filecache_extended' => ['fileid'], 'file_locks' => ['id'], 'jobs' => ['id'], 'mimetypes' => ['id'], 'mounts' => ['id', 'storage_id', 'root_id', 'mount_id'], + 'share_external' => ['id', 'parent'], 'storages' => ['numeric_id'], ]; diff --git a/core/Command/Db/ConvertFilecacheBigInt.php b/core/Command/Db/ConvertFilecacheBigInt.php index 6b5b0dc9c8..6575d41d3b 100644 --- a/core/Command/Db/ConvertFilecacheBigInt.php +++ b/core/Command/Db/ConvertFilecacheBigInt.php @@ -64,12 +64,14 @@ class ConvertFilecacheBigInt extends Command { 'activity_mq' => ['mail_id'], 'authtoken' => ['id'], 'bruteforce_attempts' => ['id'], + 'federated_reshares' => ['share_id'], 'filecache' => ['fileid', 'storage', 'parent', 'mimetype', 'mimepart', 'mtime', 'storage_mtime'], 'filecache_extended' => ['fileid'], 'file_locks' => ['id'], 'jobs' => ['id'], 'mimetypes' => ['id'], 'mounts' => ['id', 'storage_id', 'root_id', 'mount_id'], + 'share_external' => ['id', 'parent'], 'storages' => ['numeric_id'], ]; }