diff options
author | Joas Schilling <coding@schilljs.com> | 2019-12-05 14:38:28 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-12-10 11:01:26 +0100 |
commit | 059968e1c705f5b06cd6049f1a7ad05a123f5500 (patch) | |
tree | d777ed35aa8ebba888c6105fe914af298db0ed15 /apps | |
parent | b78a141b0b003f6de04f16863e0fb67f28658dab (diff) | |
download | nextcloud-server-059968e1c705f5b06cd6049f1a7ad05a123f5500.tar.gz nextcloud-server-059968e1c705f5b06cd6049f1a7ad05a123f5500.zip |
Pick a shorter name for the transfer ownership table
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/composer/composer/autoload_classmap.php | 2 | ||||
-rw-r--r-- | apps/files/composer/composer/autoload_static.php | 2 | ||||
-rw-r--r-- | apps/files/lib/Db/TransferOwnershipMapper.php | 2 | ||||
-rw-r--r-- | apps/files/lib/Migration/Version11301Date20191205150729.php (renamed from apps/files/lib/Migration/Version11301Date20191113195931.php) | 21 |
4 files changed, 15 insertions, 12 deletions
diff --git a/apps/files/composer/composer/autoload_classmap.php b/apps/files/composer/composer/autoload_classmap.php index f4d766c8a4a..a4a72d59c13 100644 --- a/apps/files/composer/composer/autoload_classmap.php +++ b/apps/files/composer/composer/autoload_classmap.php @@ -45,7 +45,7 @@ return array( 'OCA\\Files\\Helper' => $baseDir . '/../lib/Helper.php', 'OCA\\Files\\Listener\\LegacyLoadAdditionalScriptsAdapter' => $baseDir . '/../lib/Listener/LegacyLoadAdditionalScriptsAdapter.php', 'OCA\\Files\\Listener\\LoadSidebarListener' => $baseDir . '/../lib/Listener/LoadSidebarListener.php', - 'OCA\\Files\\Migration\\Version11301Date20191113195931' => $baseDir . '/../lib/Migration/Version11301Date20191113195931.php', + 'OCA\\Files\\Migration\\Version11301Date20191205150729' => $baseDir . '/../lib/Migration/Version11301Date20191205150729.php', 'OCA\\Files\\Notification\\Notifier' => $baseDir . '/../lib/Notification/Notifier.php', 'OCA\\Files\\Service\\DirectEditingService' => $baseDir . '/../lib/Service/DirectEditingService.php', 'OCA\\Files\\Service\\OwnershipTransferService' => $baseDir . '/../lib/Service/OwnershipTransferService.php', diff --git a/apps/files/composer/composer/autoload_static.php b/apps/files/composer/composer/autoload_static.php index 4f25b083176..91e29fac487 100644 --- a/apps/files/composer/composer/autoload_static.php +++ b/apps/files/composer/composer/autoload_static.php @@ -60,7 +60,7 @@ class ComposerStaticInitFiles 'OCA\\Files\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php', 'OCA\\Files\\Listener\\LegacyLoadAdditionalScriptsAdapter' => __DIR__ . '/..' . '/../lib/Listener/LegacyLoadAdditionalScriptsAdapter.php', 'OCA\\Files\\Listener\\LoadSidebarListener' => __DIR__ . '/..' . '/../lib/Listener/LoadSidebarListener.php', - 'OCA\\Files\\Migration\\Version11301Date20191113195931' => __DIR__ . '/..' . '/../lib/Migration/Version11301Date20191113195931.php', + 'OCA\\Files\\Migration\\Version11301Date20191205150729' => __DIR__ . '/..' . '/../lib/Migration/Version11301Date20191205150729.php', 'OCA\\Files\\Notification\\Notifier' => __DIR__ . '/..' . '/../lib/Notification/Notifier.php', 'OCA\\Files\\Service\\DirectEditingService' => __DIR__ . '/..' . '/../lib/Service/DirectEditingService.php', 'OCA\\Files\\Service\\OwnershipTransferService' => __DIR__ . '/..' . '/../lib/Service/OwnershipTransferService.php', diff --git a/apps/files/lib/Db/TransferOwnershipMapper.php b/apps/files/lib/Db/TransferOwnershipMapper.php index f9f4e995feb..fe87fc5e48d 100644 --- a/apps/files/lib/Db/TransferOwnershipMapper.php +++ b/apps/files/lib/Db/TransferOwnershipMapper.php @@ -31,7 +31,7 @@ use OCP\IDBConnection; class TransferOwnershipMapper extends QBMapper { public function __construct(IDBConnection $db) { - parent::__construct($db, 'user_transfer_ownership', TransferOwnership::class); + parent::__construct($db, 'user_transfer_owner', TransferOwnership::class); } public function getById(int $id): TransferOwnership { diff --git a/apps/files/lib/Migration/Version11301Date20191113195931.php b/apps/files/lib/Migration/Version11301Date20191205150729.php index d5c255bb8a3..2ec9bdb4718 100644 --- a/apps/files/lib/Migration/Version11301Date20191113195931.php +++ b/apps/files/lib/Migration/Version11301Date20191205150729.php @@ -1,7 +1,5 @@ <?php - declare(strict_types=1); - /** * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> * @@ -24,15 +22,14 @@ declare(strict_types=1); * */ - namespace OCA\Files\Migration; use Closure; use OCP\DB\ISchemaWrapper; -use OCP\Migration\SimpleMigrationStep; use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; -class Version11301Date20191113195931 extends SimpleMigrationStep { +class Version11301Date20191205150729 extends SimpleMigrationStep { /** * @param IOutput $output @@ -44,11 +41,12 @@ class Version11301Date20191113195931 extends SimpleMigrationStep { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); - $table = $schema->createTable('user_transfer_ownership'); - $table->addColumn('id', 'integer', [ + $table = $schema->createTable('user_transfer_owner'); + $table->addColumn('id', 'bigint', [ 'autoincrement' => true, 'notnull' => true, - 'length' => 4, + 'length' => 20, + 'unsigned' => true, ]); $table->addColumn('source_user', 'string', [ 'notnull' => true, @@ -68,7 +66,12 @@ class Version11301Date20191113195931 extends SimpleMigrationStep { ]); $table->setPrimaryKey(['id']); + // Quite radical, we just assume no one updates cross beta with a pending request. + // Do not try this at home + if ($schema->hasTable('user_transfer_ownership')) { + $schema->dropTable('user_transfer_ownership'); + } + return $schema; } - } |