From 60b51e8c96327dd9815aaa5d30bb1eb429ea67c7 Mon Sep 17 00:00:00 2001 From: JonOfUs Date: Fri, 11 Nov 2022 12:10:26 +0100 Subject: [PATCH] Fix broken migration, lead to errors with too large db keys --- lib/Migration/Version0006Date20221106215500.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Migration/Version0006Date20221106215500.php b/lib/Migration/Version0006Date20221106215500.php index a11a4b7..05dff01 100644 --- a/lib/Migration/Version0006Date20221106215500.php +++ b/lib/Migration/Version0006Date20221106215500.php @@ -14,6 +14,13 @@ class Version0006Date20221106215500 extends \OCP\Migration\SimpleMigrationStep { $schema = $schemaClosure(); $table = $schema->getTable('gpodder_subscriptions'); + + // hotfix due to errors with too long key lengths (https://github.com/thrillfall/nextcloud-gpodder/issues/103) + $table->dropIndex('subscriptions_url_user'); + $table->addUniqueIndex(['url', "user_id"], 'subscriptions_url_user', [ + 'lengths' => [ 500, 200 ] + ]); + $table->changeColumn('url', ['length' => 1000]); return $schema;