From 4f3b63cc73d63a2e9ea3daa7d71b0566635098d2 Mon Sep 17 00:00:00 2001 From: J0WI Date: Wed, 27 Nov 2019 15:52:34 +0100 Subject: [PATCH] Extend propertypath to 4000 Signed-off-by: J0WI --- .../Version18000Date20191126000000.php | 54 +++++++++++++++++++ version.php | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 core/Migrations/Version18000Date20191126000000.php diff --git a/core/Migrations/Version18000Date20191126000000.php b/core/Migrations/Version18000Date20191126000000.php new file mode 100644 index 0000000000000..00d2cfbb621c1 --- /dev/null +++ b/core/Migrations/Version18000Date20191126000000.php @@ -0,0 +1,54 @@ + + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ + +namespace OC\Core\Migrations; + +use Closure; +use OCP\DB\ISchemaWrapper; +use OCP\Migration\IOutput; +use OCP\Migration\SimpleMigrationStep; + +class Version18000Date20191126000000 extends SimpleMigrationStep { + + /** + * @param IOutput $output + * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` + * @param array $options + * @return null|ISchemaWrapper + */ + public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) { + /** @var ISchemaWrapper $schema */ + $schema = $schemaClosure(); + + if ($schema->hasTable('properties')) { + $table = $schema->getTable('properties'); + + $table->changeColumn('propertypath', [ + 'notnull' => true, + 'length' => 4000, + 'default' => '', + ]); + } + + return $schema; + } +} diff --git a/version.php b/version.php index abbcca4d03b27..d5452bb0ab23d 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ // between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel // when updating major/minor version number. -$OC_Version = array(18, 0, 0, 1); +$OC_Version = array(18, 0, 0, 2); // The human readable string $OC_VersionString = '18.0.0 Alpha';