Add separate migration so that all systems have the same schema after hotfix
This commit is contained in:
parent
60b51e8c96
commit
9242def504
23
lib/Migration/Version0007Date202211111100.php
Normal file
23
lib/Migration/Version0007Date202211111100.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace OCA\GPodderSync\Migration;
|
||||
|
||||
use Closure;
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
use OCP\Migration\IOutput;
|
||||
|
||||
class Version0007Date202211111100 extends \OCP\Migration\SimpleMigrationStep {
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options) {
|
||||
/** @var ISchemaWrapper $schema */
|
||||
$schema = $schemaClosure();
|
||||
|
||||
$table = $schema->getTable('gpodder_subscriptions');
|
||||
$table->dropIndex('subscriptions_url_user');
|
||||
$table->addUniqueIndex(['url', "user_id"], 'subscriptions_url_user', [
|
||||
'lengths' => [ 500, 200 ]
|
||||
]);
|
||||
|
||||
return $schema;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user