Skip to content

fix: add post-migration repair step to heal missing appointment columns#69

Open
luflow wants to merge 2 commits intomainfrom
claude/fix-nextcloud-integration-n9xDg
Open

fix: add post-migration repair step to heal missing appointment columns#69
luflow wants to merge 2 commits intomainfrom
claude/fix-nextcloud-integration-n9xDg

Conversation

@luflow
Copy link
Copy Markdown
Owner

@luflow luflow commented May 4, 2026

Some Nextcloud installs (#68) record migration 12 in oc_migrations
without applying its DDL, leaving att_appointments without closed_at /
response_deadline and breaking AutoCloseJob.

Re-apply those columns and indexes idempotently from a post-migration
repair step so app enable / occ upgrade self-heals affected installs.

Some Nextcloud installs (#68) record migration 12 in oc_migrations
without applying its DDL, leaving att_appointments without closed_at /
response_deadline and breaking AutoCloseJob.

Re-apply those columns and indexes idempotently from a post-migration
repair step so app enable / occ upgrade self-heals affected installs.
@Bylumix
Copy link
Copy Markdown

Bylumix commented May 4, 2026

Thanks for the quick fix and the clean self-healing approach

really appreciated! 👍👌

Probe the columns with a cheap SELECT … LIMIT 0 first; only fall back
to createSchema()/migrateToSchema() when the probe fails. Saves a
full-database schema introspection on every occ upgrade in the steady
state, where the columns are already present.

Also use OCP\DB\Types::DATETIME for consistency and clean up the test
factory's bool-soup signature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants