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

Fix DB migration 11 to 12 #4417

Merged
merged 3 commits into from
Nov 5, 2024
Merged

Fix DB migration 11 to 12 #4417

merged 3 commits into from
Nov 5, 2024

Conversation

mahibi
Copy link
Collaborator

@mahibi mahibi commented Nov 5, 2024

https://github.com/nextcloud/talk-android/pull/4333/files was merged with modified 11.json instead to create 12.json.

This PR will revert 11.json to the old state and and 12.json (DB migration is already in place, just the json was missing)

Not sure if it could have been a problem for released alpha versions, but luckily(😄) the alpha build that could have been affected failed because of a translation error.

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi self-assigned this Nov 5, 2024
@mahibi mahibi changed the title Bugfix/noid/fix db migration11to12 Fix DB migration 11 to 12 Nov 5, 2024
@mahibi mahibi mentioned this pull request Nov 5, 2024
5 tasks
@mahibi mahibi requested a review from rapterjet2004 November 5, 2024 11:23
@mahibi mahibi added the 3. to review Waiting for reviews label Nov 5, 2024
@mahibi mahibi marked this pull request as ready for review November 5, 2024 11:23
Copy link
Contributor

@rapterjet2004 rapterjet2004 left a comment

Choose a reason for hiding this comment

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

Sorry about that, should have checked the json 😅

also the tests seem to be failing because of the error I sent you

Resource compilation failed (Failed to compile values resource file /drone/src/app/build/intermediates/incremental/genericDebug/mergeGenericDebugResources/merged.dir/values-ug/values-ug.xml

@mahibi mahibi force-pushed the bugfix/noid/fixDbMigration11to12 branch from a677cc5 to 4ff9b2b Compare November 5, 2024 12:49
@mahibi
Copy link
Collaborator Author

mahibi commented Nov 5, 2024

Sorry about that, should have checked the json 😅

also the tests seem to be failing because of the error I sent you

Resource compilation failed (Failed to compile values resource file /drone/src/app/build/intermediates/incremental/genericDebug/mergeGenericDebugResources/merged.dir/values-ug/values-ug.xml

no need to be sorry.
Yes i just fixed the translation (this time for real by just removing the apostrophes :D as my first fix failed..) so now it should succeed to build

@mahibi mahibi marked this pull request as draft November 5, 2024 13:02
@mahibi
Copy link
Collaborator Author

mahibi commented Nov 5, 2024

ok something is still wrong when trying out the migration, will have a closer look

this will set NOT NULL and DEFAULT 0 to hasArchived column

Otherwise there would be an error when updating from the previous DB version:

IllegalStateException: Migration didn't properly handle: Conversations(com.nextcloud.talk.data.database.model.ConversationEntity)

Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi requested a review from rapterjet2004 November 5, 2024 13:47
@mahibi mahibi marked this pull request as ready for review November 5, 2024 13:47
Copy link
Contributor

github-actions bot commented Nov 5, 2024

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4417-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

Copy link
Contributor

github-actions bot commented Nov 5, 2024

Codacy

Lint

TypemasterPR
Warnings94152
Errors13289

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1111
Dodgy code7979
Internationalization33
Malicious code vulnerability33
Performance66
Security11
Total109109

Lint increased!

@mahibi mahibi merged commit 44ab12b into master Nov 5, 2024
18 of 19 checks passed
@mahibi mahibi deleted the bugfix/noid/fixDbMigration11to12 branch November 5, 2024 15:08
@mahibi
Copy link
Collaborator Author

mahibi commented Nov 5, 2024

no backport by intention as #4333 is not backported..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants