nextcloud / nextcloud/server

Predict database migration impact of upgrades

Open
#45,943 6 comments 1 reaction 1 assignee View on GitHub

@Altahrim is already working on this.

Since Sep 8, 2026.

  • #46476 by @ArtificialOwl — merged
🍂 2024-Autumn 2. developing enhancement feature: apps management feature: database feature: install and update
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.

As a Nextcloud admin I want to be able to plan when to do the next upgrade based on how long it will take. Quick updates that pass in 10 minutes can be done without any significant downtime. If the upgrade runs for 12h it needs a scheduled maintenance window, e.g. on a weekend, where Nextcloud is not available and users have to be warned in advance.

Describe the solution you'd like

Collect information about the changes done in migration files for server and the apps. Distribute the information through the updater server and the app store. Use the information locally diff applied and new migrations, then show a digest of all the changes that will be done, or tell me that there will be no database changes when I upgrade.

Work packages

  • Add PHP attributes to annotate migration classes, e.g. "adds a new column to oc_filecache", "creates a new table" or "drops a column from oc_accounts".
  • Adapt the server release script so it dumps a list of migrations and their changes for server and shipped apps. It's important that the list contains all migrations, not just the ones that are "new" because we don't know which version is upgraded from.
  • Adapt the updater server to ship a list of all migrations inside a specific release
  • Adapt the app store to ship a list of all migrations inside a specific release
  • Add an occ command to query for updates
    • Query the updater server for the next release and its migration data
    • Check for app upgrades necessary (e.g. doing a major update of the server)
    • Show a list of the changes that will happen on server and apps upgrade

Follow-ups

  • Adapt the admin updater UI
    • Fetch migrations of the upcoming release
    • Check for app upgrades necessary (e.g. doing a major update of the server)
    • Show a list of the changes that will happen on server and apps upgrade
  • Adapt the app management (changelog tab?)
    • Diff currently applied migrations with the list of migrations provided through the app store
    • Show a list of the changes that will happen on app upgrade

Describe alternatives you've considered

Download server and apps, look at the migration files and parse the code to find out the information.

Additional context

N/a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.