Fix voting data migration for AddFollowableCounterCacheToVotings#12350
Merged
Fix voting data migration for AddFollowableCounterCacheToVotings#12350
Conversation
alecslupu
approved these changes
Jan 29, 2024
Contributor
alecslupu
left a comment
There was a problem hiding this comment.
Reset the DB, got the error,
reacreated the app using this PR, and worked well.
entantoencuanto
added a commit
that referenced
this pull request
Feb 1, 2024
* develop: Remove elections module (#12366) Fix flaky for questionnaire drag and drop question (#12367) Redesign: datepicker (#11768) Patch participatory spaces factories (#12341) Upgrade chromedriver to v120+ (#12351) Fix bug in welcome notifications when the organization has weird characters (#12326) Have only one h1 in the admin pages (#12340) Fix voting data migration for AddFollowableCounterCacheToVotings (#12350) New Crowdin updates (#12282) Fix broken links in debates index (#12343)
This was referenced Feb 13, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
While working with an app and disabling the
decidim-electionsmodule, I found a data migration that doesn't work. This PR fixes it by following the strategy 3 from #8068 (Define ad-hoc model classe)Testing
To check the failure:
decidim-electionsgem fromdevelopment_app/Gemfilebundle installbin/rails db:drop db:create db:migrateTo fix it:
rm development_app/db/migrate/*_add_followable_counter_cache_to_votings.decidim_elections.rbbin/rails decidim:updatebin/rails db:migrate