Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Migration/Version040300Date20240523123456.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
'notnull' => false,
'comment' => 'unix-timestamp',
]);
$table->setPrimaryKey(['id'], 'id');
$table->setPrimaryKey(['id'], 'forms_upload_files_id');

Check warning on line 62 in lib/Migration/Version040300Date20240523123456.php

View check run for this annotation

Codecov / codecov/patch

lib/Migration/Version040300Date20240523123456.php#L62

Added line #L62 was not covered by tests
}

return $schema;
Expand Down
40 changes: 40 additions & 0 deletions lib/Migration/Version050004Date20250319180638.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

namespace OCA\Forms\Migration;

use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;

/**
* FIXME Auto-generated migration step: Please modify to your needs!
*/
class Version050004Date20250319180638 extends SimpleMigrationStep {

/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure
* @param array $options
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {

Check warning on line 28 in lib/Migration/Version050004Date20250319180638.php

View check run for this annotation

Codecov / codecov/patch

lib/Migration/Version050004Date20250319180638.php#L28

Added line #L28 was not covered by tests
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();

Check warning on line 30 in lib/Migration/Version050004Date20250319180638.php

View check run for this annotation

Codecov / codecov/patch

lib/Migration/Version050004Date20250319180638.php#L30

Added line #L30 was not covered by tests

if ($schema->hasTable('forms_v2_uploaded_files')) {
$table = $schema->getTable('forms_v2_uploaded_files');
$table->dropPrimaryKey();
$table->setPrimaryKey(['id'], 'forms_upload_files_id');

Check warning on line 35 in lib/Migration/Version050004Date20250319180638.php

View check run for this annotation

Codecov / codecov/patch

lib/Migration/Version050004Date20250319180638.php#L32-L35

Added lines #L32 - L35 were not covered by tests
Comment thread
susnux marked this conversation as resolved.
}

return $schema;

Check warning on line 38 in lib/Migration/Version050004Date20250319180638.php

View check run for this annotation

Codecov / codecov/patch

lib/Migration/Version050004Date20250319180638.php#L38

Added line #L38 was not covered by tests
}
}
Loading