Fix broken migration, lead to errors with too large db keys

This commit is contained in:
JonOfUs 2022-11-11 12:10:26 +01:00 committed by Jonathan Flueren
parent 28e46dde65
commit 60b51e8c96

View File

@ -14,6 +14,13 @@ class Version0006Date20221106215500 extends \OCP\Migration\SimpleMigrationStep {
$schema = $schemaClosure(); $schema = $schemaClosure();
$table = $schema->getTable('gpodder_subscriptions'); $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]); $table->changeColumn('url', ['length' => 1000]);
return $schema; return $schema;