Merge branch 'main' into patch-1
This commit is contained in:
@@ -43,12 +43,12 @@ class BoardImport extends Command {
|
||||
null,
|
||||
InputOption::VALUE_REQUIRED,
|
||||
'Configuration json file.',
|
||||
'config.json'
|
||||
null
|
||||
)
|
||||
->addOption(
|
||||
'data',
|
||||
null,
|
||||
InputOption::VALUE_OPTIONAL,
|
||||
InputOption::VALUE_REQUIRED,
|
||||
'Data file to import.',
|
||||
'data.json'
|
||||
)
|
||||
|
||||
@@ -271,7 +271,7 @@ class Version1000Date20200306161713 extends SimpleMigrationStep {
|
||||
]);
|
||||
$table->setPrimaryKey(['id']);
|
||||
$table->addIndex(['participant'], 'deck_assigned_users_idx_p');
|
||||
$table->addIndex(['card_id'], 'deck_assigned_users_idx_c');
|
||||
//$table->addIndex(['card_id'], 'deck_assigned_users_idx_c');
|
||||
}
|
||||
|
||||
if (!$schema->hasTable('deck_board_acl')) {
|
||||
@@ -307,7 +307,7 @@ class Version1000Date20200306161713 extends SimpleMigrationStep {
|
||||
]);
|
||||
$table->setPrimaryKey(['id']);
|
||||
$table->addUniqueIndex(['board_id', 'type', 'participant'], 'deck_board_acl_uq_i');
|
||||
$table->addIndex(['board_id'], 'deck_board_acl_idx_i');
|
||||
//$table->addIndex(['board_id'], 'deck_board_acl_idx_i');
|
||||
}
|
||||
return $schema;
|
||||
}
|
||||
|
||||
35
lib/Migration/Version11000Date20240222115515.php
Normal file
35
lib/Migration/Version11000Date20240222115515.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
|
||||
namespace OCA\Deck\Migration;
|
||||
|
||||
use Closure;
|
||||
use OCP\DB\ISchemaWrapper;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\SimpleMigrationStep;
|
||||
|
||||
class Version11000Date20240222115515 extends SimpleMigrationStep {
|
||||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
|
||||
$schema = $schemaClosure();
|
||||
$returnValue = null;
|
||||
|
||||
$assignedUsersTable = $schema->getTable('deck_assigned_users');
|
||||
if($assignedUsersTable->hasIndex('deck_assigned_users_idx_c')) {
|
||||
$assignedUsersTable->dropIndex('deck_assigned_users_idx_c');
|
||||
$returnValue = $schema;
|
||||
}
|
||||
|
||||
$boardAclTable = $schema->getTable('deck_board_acl');
|
||||
if($boardAclTable->hasIndex('deck_board_acl_idx_i')) {
|
||||
$boardAclTable->dropIndex('deck_board_acl_idx_i');
|
||||
$returnValue = $schema;
|
||||
}
|
||||
return $returnValue;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user