decidim / metadecidim

This is the repository for the code of Metadecidim community, we experiment with the new features, we are an experimental community
https://meta.decidim.org
8 stars 7 forks source link

Fix old migration referring to Decidim model #104

Closed ahukkanen closed 2 years ago

ahukkanen commented 2 years ago

This old migration was referring to a Decidim model which did not understand it had new columns.

Fixing this the same way as we today with other migrations in the core.

This problem did not exist in the core in the same migration. This is likely something that was added specifically for MetaDecidim.

In order to replicate the issue:

  1. bundle exec rails db:drop db:create
  2. bundle exec rails db:migrate
  3. See the error
andreslucena commented 2 years ago

Confirmed it locally.

This problem did not exist in the core in the same migration. This is likely something that was added specifically for MetaDecidim.

Yes, that's odd. I double-checked just to be sure:

https://github.com/decidim/decidim/blob/develop/decidim-core/db/migrate/20170612070905_add_uniqueness_to_name_and_document_number_to_user_groups.rb

This was introduced here at 1bd634f44d0649ee4d87f89ae8a4c65c9790d729. It's probably a problem that only happens/happened in Decidim's first installations (Metadecidim and Barcelona).

It probably needs to be fixed at Barcelona too (cc/ @agustibr): https://github.com/AjuntamentdeBarcelona/decidim-barcelona/blob/master/db/migrate/20170616083641_add_uniqueness_to_name_and_document_number_to_user_groups.decidim.rb