Skip to content

fix(cloud_federation_api): ensure federated_invites table always exists - #66686

Merged
susnux merged 1 commit into
masterfrom
fix/federated_invites_table
Nov 18, 2026
Merged

susnux merged 1 commit into
masterfrom
fix/federated_invites_table

Conversation

@max-nextcloud

@max-nextcloud max-nextcloud commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Add another migration to create the table again on instances where it was removed.

The table was originally created by this app
Then responsibility was moved to the contacts app.
For some time there was a repair job in this app that removed the table.
That job could cause problems removing the table after the contacts app created it.
So the cleanup job was removed.
However there are still some instances without the table as the cleanup job removed it.
This leads to warnings as occ db:schema:check expects the table to exist.
It also leads to an inconsistent schema between instances depending on wether the repair job ran.

@max-nextcloud
max-nextcloud requested a review from a team as a code owner November 17, 2026 09:55
@max-nextcloud
max-nextcloud requested review from Altahrim and CarlSchwan and removed request for a team November 17, 2026 09:55
@max-nextcloud
max-nextcloud force-pushed the fix/federated_invites_table branch from 9279c9d to c7927be Compare November 17, 2026 09:57
@max-nextcloud max-nextcloud added the 3. to review Waiting for reviews label Nov 17, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Nov 17, 2026
@max-nextcloud max-nextcloud self-assigned this Nov 17, 2026
@max-nextcloud max-nextcloud moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 📝 Productivity team Nov 17, 2026
declare(strict_types=1);

/**
* SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors

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.

2026, or it's a copy of previously existing migration?

Looks very much like files in https://github.com/nextcloud/contacts/tree/main/lib/Migration, maybe leave a comment that contacts one is the source of truth (the one that should be a correct migration), and this is a backup copy in case something went wrong?

@max-nextcloud

Copy link
Copy Markdown
Contributor Author

/backport! to stable35 please

Add another migration to create the table again on instances where it was removed.

If the table already exists the migration does nothing.

The table was originally created by this app
Then responsibility was moved to the contacts app.
For some time there was a repair job in this app that removed the table.
That job could cause problems removing the table after the contacts app created it.
So the cleanup job was removed.
However there are still some instances without the table as the cleanup job removed it.
This leads to warnings as `occ db:schema:check` expects the table to exist.
It also leads to an inconsistent schema between instances depending on wether the repair job ran.

Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud
max-nextcloud force-pushed the fix/federated_invites_table branch from c7927be to 69cdad5 Compare November 18, 2026 13:39
@susnux
susnux merged commit e42db73 into master Nov 18, 2026
191 of 200 checks passed
@susnux
susnux deleted the fix/federated_invites_table branch November 18, 2026 20:04
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 📝 Productivity team Nov 18, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

3. to review Waiting for reviews

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

[Bug]: NC 35.0.2 Still get missing table 'oc_federated_invites'

5 participants