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

bump: Decidim-Awesome to last commit #607

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ gem "decidim-budget_category_voting", git: "https://github.com/alecslupu-pfa/dec
gem "decidim-cache_cleaner"
gem "decidim-category_enhanced", "~> 0.0.1"
gem "decidim-custom_proposal_states", git: "https://github.com/alecslupu-pfa/decidim-module-custom_proposal_states", branch: DECIDIM_BRANCH
gem "decidim-decidim_awesome", git: "https://github.com/decidim-ice/decidim-module-decidim_awesome", branch: "main"
gem "decidim-decidim_awesome", git: "https://github.com/decidim-ice/decidim-module-decidim_awesome", branch: DECIDIM_BRANCH
gem "decidim-extended_socio_demographic_authorization_handler", git: "https://github.com/OpenSourcePolitics/decidim-module-extended_socio_demographic_authorization_handler.git",
branch: DECIDIM_BRANCH
gem "decidim-extra_user_fields", git: "https://github.com/OpenSourcePolitics/decidim-module-extra_user_fields.git", branch: "temp/twilio-compatibility-0.27"
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ GIT

GIT
remote: https://github.com/decidim-ice/decidim-module-decidim_awesome
revision: 058af7db47737e3ca108ac8e08efd5ec55d67a44
branch: main
revision: 51bc593da8fb72d14c2e5b5df55dbb686be1fbbe
branch: release/0.27-stable
specs:
decidim-decidim_awesome (0.10.2)
decidim-decidim_awesome (0.10.3)
decidim-admin (>= 0.26.0, < 0.28)
decidim-core (>= 0.26.0, < 0.28)
deface (>= 1.5)
Expand Down
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
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# frozen_string_literal: true

# This migration comes from decidim (originally 20180206143340)

class FixReferenceForAllResources < ActiveRecord::Migration[5.1]
def up
models = ActiveRecord::Base.descendants.select { |c| c.included_modules.include?(Decidim::HasReference) }

models.each do |model|
next unless model.table_exists?

model.find_each(&:touch)
end
end
Expand Down
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_09_16_143432) do
ActiveRecord::Schema.define(version: 2024_10_10_092645) do

# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
Expand Down Expand Up @@ -329,7 +329,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
2 changes: 1 addition & 1 deletion spec/factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
require "decidim/accountability/test/factories"
require "decidim/system/test/factories"
require "decidim/participatory_processes/test/factories"
# require "decidim/decidim_awesome/test/factories"
require "decidim/decidim_awesome/test/factories"
require "decidim/verifications/test/factories"
require "decidim/forms/test/factories"
require "decidim/surveys/test/factories"
Expand Down
Loading