Skip to content

Commit

Permalink
Update awesome with private fields (#93)
Browse files Browse the repository at this point in the history
* update awesome with private fields

* use merged branch
  • Loading branch information
microstudi authored Aug 20, 2024
1 parent f1950f7 commit 1243e54
Show file tree
Hide file tree
Showing 8 changed files with 17,959 additions and 729 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gem "decidim-budgets_paper_ballots", git: "https://github.com/digidemlab/decidim

gem "decidim-cache_cleaner"
gem "decidim-custom_proposal_states", git: "https://github.com/alecslupu-pfa/decidim-module-custom_proposal_states", branch: DECIDIM_BRANCH
gem "decidim-decidim_awesome", "~> 0.9.1"
gem "decidim-decidim_awesome", git: "https://github.com/decidim-ice/decidim-module-decidim_awesome", branch: DECIDIM_BRANCH
gem "decidim-extra_user_fields", git: "https://github.com/OpenSourcePolitics/decidim-module-extra_user_fields.git", branch: DECIDIM_BRANCH
gem "decidim-friendly_signup", git: "https://github.com/OpenSourcePolitics/decidim-module-friendly_signup.git"
gem "decidim-homepage_interactive_map", git: "https://github.com/OpenSourcePolitics/decidim-module-homepage_interactive_map.git", branch: DECIDIM_BRANCH
Expand Down
19 changes: 13 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ GIT
decidim-proposals (~> 0.27)
deface (>= 1.9)

GIT
remote: https://github.com/decidim-ice/decidim-module-decidim_awesome
revision: adfcf0b311ff375016548c1f99c9a91043dd1676
branch: release/0.27-stable
specs:
decidim-decidim_awesome (0.10.3)
decidim-admin (>= 0.26.0, < 0.28)
decidim-core (>= 0.26.0, < 0.28)
deface (>= 1.5)
sassc (~> 2.3)

GIT
remote: https://github.com/digidemlab/decidim-module-budgets_paper_ballots
revision: 750d20ecc670859df85393c01a72902e20509562
Expand Down Expand Up @@ -390,10 +401,6 @@ GEM
decidim-debates (0.27.5)
decidim-comments (= 0.27.5)
decidim-core (= 0.27.5)
decidim-decidim_awesome (0.9.3)
decidim-admin (>= 0.26.0, < 0.28)
decidim-core (>= 0.26.0, < 0.28)
sassc (~> 2.3)
decidim-dev (0.27.5)
axe-core-rspec (~> 4.1.0)
byebug (~> 11.0)
Expand Down Expand Up @@ -1028,7 +1035,7 @@ DEPENDENCIES
decidim-budgets_paper_ballots!
decidim-cache_cleaner
decidim-custom_proposal_states!
decidim-decidim_awesome (~> 0.9.1)
decidim-decidim_awesome!
decidim-dev (~> 0.27.0)
decidim-extra_user_fields!
decidim-friendly_signup!
Expand Down Expand Up @@ -1069,4 +1076,4 @@ RUBY VERSION
ruby 3.0.6p216

BUNDLED WITH
2.4.9
2.4.22
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# frozen_string_literal: true
# This migration comes from decidim_decidim_awesome (originally 20240531224204)

class AddDecidimAwesomeProposalPrivateFields < ActiveRecord::Migration[6.0]
class ProposalExtraField < ApplicationRecord
self.table_name = :decidim_awesome_proposal_extra_fields
end

def change
add_column :decidim_awesome_proposal_extra_fields, :private_body, :string
add_column :decidim_awesome_proposal_extra_fields, :decidim_proposal_type, :string
reversible do |direction|
direction.up do
execute <<~SQL.squish
UPDATE decidim_awesome_proposal_extra_fields
SET decidim_proposal_type = 'Decidim::Proposals::Proposal'
SQL
end
end

remove_index :decidim_awesome_proposal_extra_fields, name: "decidim_awesome_extra_fields_on_proposal"
add_index :decidim_awesome_proposal_extra_fields,
[:decidim_proposal_id, :decidim_proposal_type],
name: "index_decidim_awesome_proposal_extra_fields_on_decidim_proposal"

change_column_null :decidim_awesome_proposal_extra_fields, :decidim_proposal_id, false
change_column_null :decidim_awesome_proposal_extra_fields, :decidim_proposal_type, false
ProposalExtraField.reset_column_information
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true
# This migration comes from decidim_decidim_awesome (originally 20240729164227)

class AddDecidimAwesomeProposalPrivateFieldsDate < ActiveRecord::Migration[6.0]
class ProposalExtraField < ApplicationRecord
self.table_name = :decidim_awesome_proposal_extra_fields
end

def change
add_column :decidim_awesome_proposal_extra_fields, :private_body_updated_at, :datetime

reversible do |direction|
direction.up do
execute <<~SQL.squish
UPDATE decidim_awesome_proposal_extra_fields
SET private_body_updated_at = updated_at
SQL
end
end
end
end
7 changes: 5 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_06_10_143056) do
ActiveRecord::Schema.define(version: 2024_08_19_170611) do

# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
Expand Down Expand Up @@ -332,7 +332,10 @@
t.integer "weight_total", default: 0
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.index ["decidim_proposal_id"], name: "decidim_awesome_extra_fields_on_proposal"
t.string "private_body"
t.string "decidim_proposal_type", null: false
t.datetime "private_body_updated_at"
t.index ["decidim_proposal_id", "decidim_proposal_type"], name: "index_decidim_awesome_proposal_extra_fields_on_decidim_proposal"
end

create_table "decidim_awesome_vote_weights", force: :cascade do |t|
Expand Down
Loading

0 comments on commit 1243e54

Please sign in to comment.