Skip to content

Commit

Permalink
Install decidim-vocdoni module (#578)
Browse files Browse the repository at this point in the history
* Install decidim-vocdoni module

* Bump decidim-vocdoni version

* Bump decidim-vocdoni version
  • Loading branch information
fblupi authored Nov 15, 2024
1 parent d98fbfc commit e6595f7
Show file tree
Hide file tree
Showing 19 changed files with 2,162 additions and 940 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ gem "decidim-internal_evaluation", git: "https://github.com/AjuntamentdeBarcelon
gem "decidim-kids", git: "https://github.com/AjuntamentdeBarcelona/decidim-module-kids"
gem "decidim-navigation_maps", git: "https://github.com/Platoniq/decidim-module-navigation_maps"
gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer"
gem "decidim-vocdoni", git: "https://github.com/decidim-vocdoni/decidim-module-vocdoni"

gem "origami"
gem "wicked_pdf", "< 2.8"
Expand Down
11 changes: 11 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,15 @@ GIT
deface (>= 1.5)
sassc (~> 2.3)

GIT
remote: https://github.com/decidim-vocdoni/decidim-module-vocdoni
revision: 2d259f513addcfe2f6e676f721a191a38bf55a5a
specs:
decidim-vocdoni (2.0)
decidim-admin (>= 0.28.0, < 0.29)
decidim-core (>= 0.28.0, < 0.29)
node-runner (~> 1.1)

GIT
remote: https://github.com/mainio/decidim-module-term_customizer
revision: 03e6c98e85a00fe47f8db2726f1a1a98e808efda
Expand Down Expand Up @@ -632,6 +641,7 @@ GEM
net-smtp (0.3.4)
net-protocol
nio4r (2.7.3)
node-runner (1.2.0)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
Expand Down Expand Up @@ -998,6 +1008,7 @@ DEPENDENCIES
decidim-stats!
decidim-templates!
decidim-term_customizer!
decidim-vocdoni!
dotenv-rails
faker
foreman
Expand Down
1 change: 1 addition & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
["@babel/preset-react"]
],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-classes",
[
"@babel/plugin-transform-runtime",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20221204131113)

class CreateDecidimVocdoniElections < ActiveRecord::Migration[6.1]
def change
create_table :decidim_vocdoni_elections do |t|
t.jsonb :title
t.jsonb :description
t.string :stream_uri
t.datetime :start_time
t.datetime :end_time
t.datetime :published_at
t.datetime :blocked_at
t.string :status
t.references :decidim_component, index: true

t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20221207081917)

class CreateDecidimVocdoniQuestions < ActiveRecord::Migration[6.1]
def change
create_table :decidim_vocdoni_questions do |t|
t.references :decidim_vocdoni_election
t.jsonb :title
t.integer :weight

t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20221207082107)

class CreateDecidimVocdoniAnswers < ActiveRecord::Migration[6.1]
def change
create_table :decidim_vocdoni_answers do |t|
t.references :decidim_vocdoni_question
t.jsonb :title
t.jsonb :description
t.integer :weight

t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20230110084746)

class CreateDecidimVocdoniWallets < ActiveRecord::Migration[6.1]
def change
create_table :decidim_vocdoni_wallets do |t|
t.string :private_key
t.references :decidim_organization, foreign_key: true, index: true
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20230112144820)

class AddDescriptionToDecidimVocdoniQuestions < ActiveRecord::Migration[6.1]
def change
add_column :decidim_vocdoni_questions, :description, :jsonb
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20230114084206)

class AddVocdoniElectionIdToDecidimVocdoniElections < ActiveRecord::Migration[6.1]
def change
add_column :decidim_vocdoni_elections, :vocdoni_election_id, :string
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20230123112353)

class CreateDecidimVocdoniVoters < ActiveRecord::Migration[6.1]
def change
create_table :decidim_vocdoni_voters do |t|
t.string :email
t.date :born_at
t.string :wallet_address

t.references :decidim_vocdoni_election, foreign_key: true, index: true
t.timestamps
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20230215092726)

class AddVotesToDecidimVocdoniAnswers < ActiveRecord::Migration[6.1]
def change
add_column :decidim_vocdoni_answers, :votes, :integer
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20230217083343)

class AddElectionTypeAttributesToDecidimVocdoniElections < ActiveRecord::Migration[6.1]
def change
add_column :decidim_vocdoni_elections, :election_type, :jsonb, default: {}
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20230306102447)

class AddValuesToDecidimVocdoniAnswers < ActiveRecord::Migration[6.1]
def change
add_column :decidim_vocdoni_answers, :value, :integer
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20230314115532)

class ChangeCensusFieldsOnDecidimVocodniVoters < ActiveRecord::Migration[6.1]
def change
add_column :decidim_vocdoni_voters, :token, :string
remove_column :decidim_vocdoni_voters, :born_at, :date
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20231107142971)

class AddCensusDataToDecidimVocdoniElections < ActiveRecord::Migration[6.1]
def change
add_column :decidim_vocdoni_elections, :internal_census, :boolean, default: false, null: false
add_column :decidim_vocdoni_elections, :verification_types, :string, array: true, default: []
add_column :decidim_vocdoni_elections, :census_attributes, :jsonb, default: {}
add_column :decidim_vocdoni_elections, :last_census_update_records_added, :integer
add_column :decidim_vocdoni_elections, :census_last_updated_at, :datetime
add_column :decidim_vocdoni_voters, :in_vocdoni_census, :boolean, default: false, null: false
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true
# This migration comes from decidim_vocdoni (originally 20240516163557)

class AddAnswersCountToDecidimVocdoniQuestions < ActiveRecord::Migration[6.1]
def change
add_column :decidim_vocdoni_questions, :answers_count, :integer, default: 0, null: false
end
end
66 changes: 65 additions & 1 deletion 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_10_31_144530) do
ActiveRecord::Schema.define(version: 2024_11_07_122544) do

# These are extensions that must be enabled in order to support this database
enable_extension "ltree"
Expand Down Expand Up @@ -1916,6 +1916,68 @@
t.index ["decidim_organization_id"], name: "index_verifications_csv_census_to_organization"
end

create_table "decidim_vocdoni_answers", force: :cascade do |t|
t.bigint "decidim_vocdoni_question_id"
t.jsonb "title"
t.jsonb "description"
t.integer "weight"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.integer "votes"
t.integer "value"
t.index ["decidim_vocdoni_question_id"], name: "index_decidim_vocdoni_answers_on_decidim_vocdoni_question_id"
end

create_table "decidim_vocdoni_elections", force: :cascade do |t|
t.jsonb "title"
t.jsonb "description"
t.string "stream_uri"
t.datetime "start_time"
t.datetime "end_time"
t.datetime "published_at"
t.datetime "blocked_at"
t.string "status"
t.bigint "decidim_component_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.string "vocdoni_election_id"
t.jsonb "election_type", default: {}
t.boolean "internal_census", default: false, null: false
t.string "verification_types", default: [], array: true
t.jsonb "census_attributes", default: {}
t.integer "last_census_update_records_added"
t.datetime "census_last_updated_at"
t.index ["decidim_component_id"], name: "index_decidim_vocdoni_elections_on_decidim_component_id"
end

create_table "decidim_vocdoni_questions", force: :cascade do |t|
t.bigint "decidim_vocdoni_election_id"
t.jsonb "title"
t.integer "weight"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.jsonb "description"
t.integer "answers_count", default: 0, null: false
t.index ["decidim_vocdoni_election_id"], name: "index_decidim_vocdoni_questions_on_decidim_vocdoni_election_id"
end

create_table "decidim_vocdoni_voters", force: :cascade do |t|
t.string "email"
t.string "wallet_address"
t.bigint "decidim_vocdoni_election_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.string "token"
t.boolean "in_vocdoni_census", default: false, null: false
t.index ["decidim_vocdoni_election_id"], name: "index_decidim_vocdoni_voters_on_decidim_vocdoni_election_id"
end

create_table "decidim_vocdoni_wallets", force: :cascade do |t|
t.string "private_key"
t.bigint "decidim_organization_id"
t.index ["decidim_organization_id"], name: "index_decidim_vocdoni_wallets_on_decidim_organization_id"
end

create_table "oauth_access_grants", force: :cascade do |t|
t.integer "resource_owner_id", null: false
t.bigint "application_id", null: false
Expand Down Expand Up @@ -2034,6 +2096,8 @@
add_foreign_key "decidim_verifications_conflicts", "decidim_users", column: "current_user_id"
add_foreign_key "decidim_verifications_conflicts", "decidim_users", column: "managed_user_id"
add_foreign_key "decidim_verifications_csv_data", "decidim_organizations"
add_foreign_key "decidim_vocdoni_voters", "decidim_vocdoni_elections"
add_foreign_key "decidim_vocdoni_wallets", "decidim_organizations"
add_foreign_key "oauth_access_grants", "decidim_users", column: "resource_owner_id"
add_foreign_key "oauth_access_grants", "oauth_applications", column: "application_id"
add_foreign_key "oauth_access_tokens", "decidim_users", column: "resource_owner_id"
Expand Down
Loading

0 comments on commit e6595f7

Please sign in to comment.