Skip to content

fix: Remove auto increment migration on share_external - #65669

Open
SystemKeeper wants to merge 1 commit into
masterfrom
fix/noid/files-sharing-migration
Open

SystemKeeper wants to merge 1 commit into
masterfrom
fix/noid/files-sharing-migration

Conversation

@SystemKeeper

Copy link
Copy Markdown
Contributor

Summary

Returning null will stop the migration, so on existing installations the migration never ran.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
@SystemKeeper

Copy link
Copy Markdown
Contributor Author

/backport to stable35

@SystemKeeper

Copy link
Copy Markdown
Contributor Author

/backport to stable34

@SystemKeeper

Copy link
Copy Markdown
Contributor Author

/backport to stable33

@SystemKeeper
SystemKeeper marked this pull request as ready for review October 18, 2026 21:59
@SystemKeeper SystemKeeper added the 3. to review Waiting for reviews label Oct 18, 2026

@Antreesy Antreesy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise great and minimalistic solution! Thanks =)

public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
$schema->dropAutoincrementColumn('share_external', 'id');

@Antreesy Antreesy Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it make sense to add a guard here:

Suggested change
$schema->dropAutoincrementColumn('share_external', 'id');
$table = $schema->getTable('share_external');
if (!$table->getColumn('id')->getAutoincrement()) {
return null;
}
$schema->dropAutoincrementColumn('share_external', 'id');

Works on MariaDB locally, but assisted review shows it can yield an error on Oracle DB, if you try drop a column that doesn't match condition

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants