Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure we have a clean db schema when migrating #4606

Merged
merged 1 commit into from
Mar 20, 2025
Merged

Conversation

juliusknorr
Copy link
Member

@juliusknorr juliusknorr commented Mar 19, 2025

The content of the oc_richdocuments_wopi table is just temporary tokens, so in oder to ensure that the db schema matches if we install from old ownCloud versions, we can just drop and recreate the table.

This may be an issue because we did introduce new columns in the old database.xml file that was not properly covered in migration from the old project.

Note the migration/doctrine abstractions will actually not drop but change the schema as one step.

Can be tested also by dropping some tables and running occ migrations:execute richdocuments 2060Date20200302131958 manually.

@juliusknorr juliusknorr requested a review from elzody as a code owner March 19, 2025 11:32
@juliusknorr juliusknorr requested review from hweihwang and blizzz March 19, 2025 11:32
@juliusknorr juliusknorr added the bug Something isn't working label Mar 19, 2025
@juliusknorr juliusknorr changed the title fix/migration oc Ensure we have a clean db schema when migrating Mar 19, 2025
@blizzz
Copy link
Member

blizzz commented Mar 19, 2025

will actually not drop but change the schema

I understand the change includes dropping the data.

@juliusknorr
Copy link
Member Author

Turns out it does not, I added a preSchemaChange step to delete existing rows.

@juliusknorr juliusknorr merged commit 3f6106e into main Mar 20, 2025
68 checks passed
@juliusknorr juliusknorr deleted the fix/migration-oc branch March 20, 2025 10:26
@juliusknorr
Copy link
Member Author

/backport to stable31

@juliusknorr
Copy link
Member Author

/backport to stable30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants