diff --git a/Gemfile.lock b/Gemfile.lock index 731cfe7..e96ba25 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -44,7 +44,7 @@ GIT GIT remote: https://github.com/alecslupu-pfa/decidim-module-custom_proposal_states - revision: 92b02c1ed2311547b9b4688d16411b4d9be99af6 + revision: 5a01dcd0c61f7760adb929d53a6ccdbe6af5b050 branch: chore/fix-module-dependency specs: decidim-custom_proposal_states (0.26.8) @@ -62,7 +62,7 @@ GIT GIT remote: https://github.com/alecslupu-pfa/decidim-module_homepage_proposals - revision: 498631e9a5c2fa1628b25c6d6fecbedd8fc507f9 + revision: 1e5753b2db6caaba5b38c7de7865de8cf22c11db branch: feature/reset-filters specs: decidim-homepage_proposals (1.0.2) diff --git a/db/migrate/20240103110734_change_default_value_for_decidim_endorsements.decidim.rb b/db/migrate/20240103110734_change_default_value_for_decidim_endorsements.decidim.rb new file mode 100644 index 0000000..be91c9d --- /dev/null +++ b/db/migrate/20240103110734_change_default_value_for_decidim_endorsements.decidim.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +# This migration comes from decidim (originally 20231027142329) + +class ChangeDefaultValueForDecidimEndorsements < ActiveRecord::Migration[6.0] + def up + change_column_default :decidim_endorsements, :decidim_user_group_id, 0 + end + + def down + change_column_default :decidim_endorsements, :decidim_user_group_id, nil + end +end diff --git a/db/migrate/20240103110735_create_decidim_awesome_vote_weights.decidim_decidim_awesome.rb b/db/migrate/20240103110735_create_decidim_awesome_vote_weights.decidim_decidim_awesome.rb new file mode 100644 index 0000000..e23875c --- /dev/null +++ b/db/migrate/20240103110735_create_decidim_awesome_vote_weights.decidim_decidim_awesome.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +# This migration comes from decidim_decidim_awesome (originally 20231006113837) + +class CreateDecidimAwesomeVoteWeights < ActiveRecord::Migration[6.0] + def change + create_table :decidim_awesome_vote_weights do |t| + # this might be polymorphic in the future (if other types of votes are supported) + t.references :proposal_vote, null: false, index: { name: "decidim_awesome_proposals_weights_vote" } + + t.integer :weight, null: false, default: 1 + t.timestamps + end + end +end diff --git a/db/migrate/20240103110736_create_decidim_awesome_proposal_extra_fields.decidim_decidim_awesome.rb b/db/migrate/20240103110736_create_decidim_awesome_proposal_extra_fields.decidim_decidim_awesome.rb new file mode 100644 index 0000000..76a1d2e --- /dev/null +++ b/db/migrate/20240103110736_create_decidim_awesome_proposal_extra_fields.decidim_decidim_awesome.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +# This migration comes from decidim_decidim_awesome (originally 20231006113841) + +class CreateDecidimAwesomeProposalExtraFields < ActiveRecord::Migration[6.0] + def change + create_table :decidim_awesome_proposal_extra_fields do |t| + # this might be polymorphic in the future (if other types of votes are supported) + t.references :decidim_proposal, null: false, index: { name: "decidim_awesome_extra_fields_on_proposal" } + + t.jsonb :vote_weight_totals + t.integer :weight_total, default: 0 + t.timestamps + end + end +end