diff options
Diffstat (limited to 'apps/files/lib/Migration')
-rw-r--r-- | apps/files/lib/Migration/Version11301Date20191205150729.php (renamed from apps/files/lib/Migration/Version11301Date20191113195931.php) | 21 |
1 files changed, 12 insertions, 9 deletions
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; } - } |