From c972bd8eacd36df6feaa4cf92bdc18210cddb958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Pereira=20de=20Lucena?= Date: Tue, 11 May 2021 12:08:06 +0200 Subject: [PATCH] Update to 0.24.2 --- Gemfile | 8 +- Gemfile.lock | 711 ++++++++++-------- ...w_statistics_from_organizations.decidim.rb | 8 + ...create_decidim_user_moderations.decidim.rb | 13 + ...327_create_decidim_user_reports.decidim.rb | 17 + ...pension_fields_to_decidim_users.decidim.rb | 9 + ...create_decidim_user_suspensions.decidim.rb | 15 + ..._suspension_id_to_decidim_users.decidim.rb | 8 + ...reported_content_to_moderations.decidim.rb | 8 + ...dd_locale_to_moderation_reports.decidim.rb | 8 + ...encrypt_authorization_metadatas.decidim.rb | 36 + ...w_public_access_to_static_pages.decidim.rb | 18 + ..._table_block_user_functionality.decidim.rb | 9 + ..._fields_for_block_functionality.decidim.rb | 10 + ...d_email_on_moderations_to_users.decidim.rb | 8 + ..._all_sessions_for_deleted_users.decidim.rb | 12 + ...idim_forms_questionnaires.decidim_forms.rb | 17 + ...o_decidim_forms_questions.decidim_forms.rb | 8 + ...cations_conflicts.decidim_verifications.rb | 16 + ..._groups.decidim_participatory_processes.rb | 8 + ..._groups.decidim_participatory_processes.rb | 14 + ..._groups.decidim_participatory_processes.rb | 40 + ..._groups.decidim_participatory_processes.rb | 8 + ...ocesses.decidim_participatory_processes.rb | 8 + ...ht_field_to_assembly.decidim_assemblies.rb | 8 + ...add_online_meeting_url.decidim_meetings.rb | 8 + ...49_add_type_of_meeting.decidim_meetings.rb | 8 + ...pe_and_url_to_meetings.decidim_meetings.rb | 20 + ...lt_to_decidim_meetings.decidim_meetings.rb | 9 + ..._proposals_after_copy.decidim_proposals.rb | 15 + ...scope_to_debates_debate.decidim_debates.rb | 8 + ...9111354_archive_debates.decidim_debates.rb | 9 + ..._revert_archive_debates.decidim_debates.rb | 9 + ...llowable_counter_cache_to_users.decidim.rb | 17 + ...ocesses.decidim_participatory_processes.rb | 17 + ..._cache_to_assemblies.decidim_assemblies.rb | 17 + ...nter_cache_to_meetings.decidim_meetings.rb | 17 + ...er_cache_to_proposals.decidim_proposals.rb | 17 + ..._collaborative_drafts.decidim_proposals.rb | 17 + ..._for_copied_proposals.decidim_proposals.rb | 19 + ...ounter_cache_to_budgets.decidim_budgets.rb | 17 + ...ounter_cache_to_debates.decidim_debates.rb | 17 + ...le_counter_cache_to_blogs.decidim_blogs.rb | 17 + ...ache_to_conferences.decidim_conferences.rb | 17 + ..._to_consultations.decidim_consultations.rb | 17 + ...ache_to_initiatives.decidim_initiatives.rb | 17 + db/schema.rb | 90 ++- db/seeds.rb | 2 - 48 files changed, 1084 insertions(+), 342 deletions(-) create mode 100644 db/migrate/20210309111325_remove_show_statistics_from_organizations.decidim.rb create mode 100644 db/migrate/20210309111326_create_decidim_user_moderations.decidim.rb create mode 100644 db/migrate/20210309111327_create_decidim_user_reports.decidim.rb create mode 100644 db/migrate/20210309111328_add_suspension_fields_to_decidim_users.decidim.rb create mode 100644 db/migrate/20210309111329_create_decidim_user_suspensions.decidim.rb create mode 100644 db/migrate/20210309111330_add_current_suspension_id_to_decidim_users.decidim.rb create mode 100644 db/migrate/20210309111331_add_reported_content_to_moderations.decidim.rb create mode 100644 db/migrate/20210309111332_add_locale_to_moderation_reports.decidim.rb create mode 100644 db/migrate/20210309111333_encrypt_authorization_metadatas.decidim.rb create mode 100644 db/migrate/20210309111334_add_allow_public_access_to_static_pages.decidim.rb create mode 100644 db/migrate/20210309111335_update_table_block_user_functionality.decidim.rb create mode 100644 db/migrate/20210309111336_rename_decidim_user_fields_for_block_functionality.decidim.rb create mode 100644 db/migrate/20210309111337_add_email_on_moderations_to_users.decidim.rb create mode 100644 db/migrate/20210309111338_invalidate_all_sessions_for_deleted_users.decidim.rb create mode 100644 db/migrate/20210309111339_add_salt_to_decidim_forms_questionnaires.decidim_forms.rb create mode 100644 db/migrate/20210309111340_add_max_characters_to_decidim_forms_questions.decidim_forms.rb create mode 100644 db/migrate/20210309111341_create_decidim_verifications_conflicts.decidim_verifications.rb create mode 100644 db/migrate/20210309111342_add_hashtag_to_participatory_process_groups.decidim_participatory_processes.rb create mode 100644 db/migrate/20210309111343_add_metadata_columns_to_participatory_process_groups.decidim_participatory_processes.rb create mode 100644 db/migrate/20210309111344_rename_name_column_to_title_in_decidim_participatory_process_groups.decidim_participatory_processes.rb create mode 100644 db/migrate/20210309111345_add_promoted_flag_to_decidim_participatory_process_groups.decidim_participatory_processes.rb create mode 100644 db/migrate/20210309111346_add_weight_field_to_participatory_processes.decidim_participatory_processes.rb create mode 100644 db/migrate/20210309111347_add_weight_field_to_assembly.decidim_assemblies.rb create mode 100644 db/migrate/20210309111348_add_online_meeting_url.decidim_meetings.rb create mode 100644 db/migrate/20210309111349_add_type_of_meeting.decidim_meetings.rb create mode 100644 db/migrate/20210309111350_add_registration_type_and_url_to_meetings.decidim_meetings.rb create mode 100644 db/migrate/20210309111351_add_salt_to_decidim_meetings.decidim_meetings.rb create mode 100644 db/migrate/20210309111352_fix_answered_proposals_after_copy.decidim_proposals.rb create mode 100644 db/migrate/20210309111353_add_scope_to_debates_debate.decidim_debates.rb create mode 100644 db/migrate/20210309111354_archive_debates.decidim_debates.rb create mode 100644 db/migrate/20210309111355_revert_archive_debates.decidim_debates.rb create mode 100644 db/migrate/20210505115337_add_followable_counter_cache_to_users.decidim.rb create mode 100644 db/migrate/20210505115338_add_followable_counter_cache_to_participatory_processes.decidim_participatory_processes.rb create mode 100644 db/migrate/20210505115339_add_followable_counter_cache_to_assemblies.decidim_assemblies.rb create mode 100644 db/migrate/20210505115340_add_followable_counter_cache_to_meetings.decidim_meetings.rb create mode 100644 db/migrate/20210505115341_add_followable_counter_cache_to_proposals.decidim_proposals.rb create mode 100644 db/migrate/20210505115342_add_followable_counter_cache_to_collaborative_drafts.decidim_proposals.rb create mode 100644 db/migrate/20210505115343_fix_counters_for_copied_proposals.decidim_proposals.rb create mode 100644 db/migrate/20210505115344_add_followable_counter_cache_to_budgets.decidim_budgets.rb create mode 100644 db/migrate/20210505115345_add_followable_counter_cache_to_debates.decidim_debates.rb create mode 100644 db/migrate/20210505115346_add_followable_counter_cache_to_blogs.decidim_blogs.rb create mode 100644 db/migrate/20210505115347_add_followable_counter_cache_to_conferences.decidim_conferences.rb create mode 100644 db/migrate/20210505115348_add_followable_counter_cache_to_consultations.decidim_consultations.rb create mode 100644 db/migrate/20210505115349_add_followable_counter_cache_to_initiatives.decidim_initiatives.rb diff --git a/Gemfile b/Gemfile index 3890c2a..ec1a214 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ source "https://rubygems.org" ruby RUBY_VERSION -DECIDIM_VERSION = {git: "https://github.com/decidim/decidim", branch: 'release/0.23-stable'} +DECIDIM_VERSION = "0.24.2" gem "decidim", DECIDIM_VERSION gem "decidim-conferences", DECIDIM_VERSION @@ -12,11 +12,11 @@ gem "decidim-consultations", DECIDIM_VERSION gem "decidim-initiatives", DECIDIM_VERSION #gem "decidim-term_customizer", git: "https://github.com/mainio/decidim-module-term_customizer/" -gem "puma", "~> 4.3" +gem "puma", "~> 5.0" gem "uglifier", "~> 4.1" gem "wkhtmltopdf-binary", "~> 0.12" gem "airbrake", "~> 5.0" -gem "faker", "~> 1.8" +gem "faker", "~> 2.14" gem "therubyracer", "~> 0.12" gem "figaro", "~> 1.1" gem "delayed_job_active_record", "~> 4.1" @@ -44,7 +44,7 @@ group :development do gem "capistrano-rails", "~> 1.3" gem "capistrano-bundler", "~> 1.3" gem "capistrano-rbenv", "~> 2.1" - gem "capistrano3-puma", "~> 4.0" + gem "capistrano3-puma", "~> 5.0" gem "capistrano3-delayed-job", '~> 1.0' gem 'ed25519', '>= 1.2', '< 2.0' gem 'bcrypt_pbkdf', '>= 1.0', '< 2.0' diff --git a/Gemfile.lock b/Gemfile.lock index a51f4f5..27b0d7d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,247 +1,25 @@ -GIT - remote: https://github.com/decidim/decidim - revision: f830e8a22a9f809ec22501d07b1b42a6a3f0aa82 - branch: release/0.23-stable - specs: - decidim (0.23.1) - decidim-accountability (= 0.23.1) - decidim-admin (= 0.23.1) - decidim-api (= 0.23.1) - decidim-assemblies (= 0.23.1) - decidim-blogs (= 0.23.1) - decidim-budgets (= 0.23.1) - decidim-comments (= 0.23.1) - decidim-core (= 0.23.1) - decidim-debates (= 0.23.1) - decidim-forms (= 0.23.1) - decidim-generators (= 0.23.1) - decidim-meetings (= 0.23.1) - decidim-pages (= 0.23.1) - decidim-participatory_processes (= 0.23.1) - decidim-proposals (= 0.23.1) - decidim-sortitions (= 0.23.1) - decidim-surveys (= 0.23.1) - decidim-system (= 0.23.1) - decidim-verifications (= 0.23.1) - decidim-accountability (0.23.1) - decidim-comments (= 0.23.1) - decidim-core (= 0.23.1) - kaminari (~> 1.2, >= 1.2.1) - searchlight (~> 4.1) - decidim-admin (0.23.1) - active_link_to (~> 1.0) - decidim-core (= 0.23.1) - devise (~> 4.7) - devise-i18n (~> 1.2) - devise_invitable (~> 1.7) - jquery-rails (~> 4.3) - sassc (~> 2.3.0) - sassc-rails (~> 2.1.2) - decidim-api (0.23.1) - graphiql-rails (~> 1.4, < 1.5) - graphql (~> 1.9) - rack-cors (~> 1.0) - redcarpet (~> 3.4) - sprockets-es6 (~> 0.9.2) - decidim-assemblies (0.23.1) - decidim-core (= 0.23.1) - decidim-blogs (0.23.1) - decidim-admin (= 0.23.1) - decidim-comments (= 0.23.1) - decidim-core (= 0.23.1) - httparty (~> 0.17) - jquery-tmpl-rails (~> 1.1) - kaminari (~> 1.2, >= 1.2.1) - decidim-budgets (0.23.1) - decidim-comments (= 0.23.1) - decidim-core (= 0.23.1) - kaminari (~> 1.2, >= 1.2.1) - searchlight (~> 4.1) - decidim-comments (0.23.1) - decidim-core (= 0.23.1) - jquery-rails (~> 4.3) - redcarpet (~> 3.4) - decidim-conferences (0.23.1) - decidim-core (= 0.23.1) - decidim-meetings (= 0.23.1) - wicked_pdf (~> 1.4) - wkhtmltopdf-binary (~> 0.12) - decidim-consultations (0.23.1) - decidim-admin (= 0.23.1) - decidim-comments (= 0.23.1) - decidim-core (= 0.23.1) - decidim-core (0.23.1) - active_link_to (~> 1.0) - anchored (>= 1.1.0) - autoprefixer-rails (~> 8.0) - batch-loader (~> 1.2) - browser (~> 2.7) - carrierwave (~> 1.3) - cells-erb (~> 0.1.0) - cells-rails (~> 0.0.9) - charlock_holmes (~> 0.7) - date_validator (~> 0.9.0) - decidim-api (= 0.23.1) - devise (~> 4.7) - devise-i18n (~> 1.2) - diffy (~> 3.3) - doorkeeper (~> 5.1) - doorkeeper-i18n (~> 4.0) - etherpad-lite (~> 0.3) - file_validators (~> 2.1) - foundation-rails (~> 6.6, < 6.7) - foundation_rails_helper (~> 3.0) - geocoder (>= 1.5) - hashdiff (>= 0.4.0, < 2.0.0) - invisible_captcha (~> 0.12) - jquery-rails (~> 4.3) - kaminari (~> 1.2, >= 1.2.1) - loofah (~> 2.3.1) - mini_magick (~> 4.9) - mustache (~> 1.1.0) - nobspw (~> 0.6.0) - omniauth (~> 1.9) - omniauth-facebook (~> 5.0) - omniauth-google-oauth2 (~> 0.7) - omniauth-rails_csrf_protection (~> 0.1) - omniauth-twitter (~> 1.4) - paper_trail (~> 10.3) - pg (~> 1.1.4, < 2) - pg_search (~> 2.2) - premailer-rails (~> 1.10) - rack (>= 2.2.3) - rack-attack (~> 6.0) - rails (>= 5.2.4.4, < 6.0.x) - rails-i18n (~> 5.0) - rectify (~> 0.13.0) - redis (~> 4.1) - request_store (~> 1.5.0) - rubyzip (~> 2.0) - sassc (~> 2.3.0) - sassc-rails (~> 2.1.2) - seven_zip_ruby (~> 1.3) - social-share-button (~> 1.2, >= 1.2.1) - spreadsheet (~> 1.2) - sprockets (~> 3.7, < 4) - sprockets-es6 (~> 0.9.2) - truncato (~> 0.7) - uglifier (~> 4.1) - valid_email2 (~> 2.1) - wisper (~> 2.0) - decidim-debates (0.23.1) - decidim-comments (= 0.23.1) - decidim-core (= 0.23.1) - kaminari (~> 1.2, >= 1.2.1) - searchlight (~> 4.1) - decidim-dev (0.23.1) - byebug (~> 11.0) - capybara (~> 3.24) - db-query-matchers (~> 0.9.0) - decidim (= 0.23.1) - erb_lint (~> 0.0.28) - factory_bot_rails (~> 4.8) - i18n-tasks (~> 0.9.18) - mdl (~> 0.5) - nokogiri (>= 1.10.8) - puma (>= 4.3) - rails-controller-testing (~> 1.0) - rspec-cells (~> 0.3.4) - rspec-html-matchers (~> 0.9.1) - rspec-rails (~> 3.7) - rspec-retry (~> 0.6.2) - rspec_junit_formatter (~> 0.3.0) - rubocop (~> 0.71.0) - rubocop-rails (~> 2.0) - rubocop-rspec (~> 1.21) - selenium-webdriver (~> 3.142) - simplecov (~> 0.19.0) - simplecov-cobertura (~> 1.3.1) - system_test_html_screenshots (~> 0.1.1) - webmock (~> 3.6) - wisper-rspec (~> 1.0) - decidim-forms (0.23.1) - decidim-core (= 0.23.1) - wicked_pdf (~> 1.4) - wkhtmltopdf-binary (~> 0.12) - decidim-generators (0.23.1) - decidim-core (= 0.23.1) - decidim-initiatives (0.23.1) - decidim-admin (= 0.23.1) - decidim-comments (= 0.23.1) - decidim-core (= 0.23.1) - decidim-verifications (= 0.23.1) - kaminari (~> 1.2, >= 1.2.1) - origami (~> 2.1) - virtus-multiparams (~> 0.1) - wicked (~> 1.3) - wicked_pdf (~> 1.4) - wkhtmltopdf-binary (~> 0.12) - decidim-meetings (0.23.1) - cells-erb (~> 0.1.0) - cells-rails (~> 0.0.9) - decidim-core (= 0.23.1) - decidim-forms (= 0.23.1) - httparty (~> 0.17) - icalendar (~> 2.5) - jquery-tmpl-rails (~> 1.1) - kaminari (~> 1.2, >= 1.2.1) - searchlight (~> 4.1) - decidim-pages (0.23.1) - decidim-core (= 0.23.1) - decidim-participatory_processes (0.23.1) - decidim-core (= 0.23.1) - decidim-proposals (0.23.1) - acts_as_list (~> 0.9) - cells-erb (~> 0.1.0) - cells-rails (~> 0.0.9) - decidim-comments (= 0.23.1) - decidim-core (= 0.23.1) - doc2text (~> 0.4.2) - kaminari (~> 1.2, >= 1.2.1) - ransack (~> 2.1.1) - redcarpet (~> 3.4) - decidim-sortitions (0.23.1) - decidim-admin (= 0.23.1) - decidim-comments (= 0.23.1) - decidim-core (= 0.23.1) - decidim-proposals (= 0.23.1) - decidim-surveys (0.23.1) - decidim-core (= 0.23.1) - decidim-forms (= 0.23.1) - decidim-system (0.23.1) - active_link_to (~> 1.0) - decidim-core (= 0.23.1) - devise (~> 4.7) - devise-i18n (~> 1.2) - devise_invitable (~> 1.7) - jquery-rails (~> 4.3) - sassc (~> 2.3.0) - sassc-rails (~> 2.1.2) - decidim-verifications (0.23.1) - decidim-core (= 0.23.1) - GEM remote: https://rubygems.org/ specs: - actioncable (5.2.4.5) - actionpack (= 5.2.4.5) + actioncable (5.2.6) + actionpack (= 5.2.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.4.5) - actionpack (= 5.2.4.5) - actionview (= 5.2.4.5) - activejob (= 5.2.4.5) + actionmailer (5.2.6) + actionpack (= 5.2.6) + actionview (= 5.2.6) + activejob (= 5.2.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.4.5) - actionview (= 5.2.4.5) - activesupport (= 5.2.4.5) + actionpack (5.2.6) + actionview (= 5.2.6) + activesupport (= 5.2.6) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.4.5) - activesupport (= 5.2.4.5) + actionview (5.2.6) + activesupport (= 5.2.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -249,20 +27,20 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (5.2.4.5) - activesupport (= 5.2.4.5) + activejob (5.2.6) + activesupport (= 5.2.6) globalid (>= 0.3.6) - activemodel (5.2.4.5) - activesupport (= 5.2.4.5) - activerecord (5.2.4.5) - activemodel (= 5.2.4.5) - activesupport (= 5.2.4.5) + activemodel (5.2.6) + activesupport (= 5.2.6) + activerecord (5.2.6) + activemodel (= 5.2.6) + activesupport (= 5.2.6) arel (>= 9.0) - activestorage (5.2.4.5) - actionpack (= 5.2.4.5) - activerecord (= 5.2.4.5) - marcel (~> 0.3.1) - activesupport (5.2.4.5) + activestorage (5.2.6) + actionpack (= 5.2.6) + activerecord (= 5.2.6) + marcel (~> 1.0.0) + activesupport (5.2.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) @@ -291,7 +69,7 @@ GEM execjs (~> 2.0) batch-loader (1.5.0) bcrypt (3.1.16) - bcrypt_pbkdf (1.0.1) + bcrypt_pbkdf (1.1.0) better_html (1.0.16) actionview (>= 4.0) activesupport (>= 4.0) @@ -304,7 +82,7 @@ GEM browser (2.7.1) builder (3.2.4) byebug (11.1.3) - capistrano (3.14.1) + capistrano (3.16.0) airbrussh (>= 1.0.0) i18n rake (>= 10.0.0) @@ -320,10 +98,10 @@ GEM capistrano3-delayed-job (1.7.6) capistrano (~> 3.0, >= 3.0.0) daemons (~> 1.3) - capistrano3-puma (4.0.0) + capistrano3-puma (5.0.4) capistrano (~> 3.7) capistrano-bundler - puma (~> 4.0) + puma (>= 4.0, < 6.0) capybara (3.35.3) addressable mini_mime (>= 0.1.3) @@ -332,10 +110,13 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (1.3.2) - activemodel (>= 4.0.0) - activesupport (>= 4.0.0) - mime-types (>= 1.16) + carrierwave (2.2.1) + activemodel (>= 5.0.0) + activesupport (>= 5.0.0) + addressable (~> 2.6) + image_processing (~> 1.1) + marcel (~> 1.0.0) + mini_mime (>= 0.1.3) ssrf_filter (~> 1.0) cells (4.1.7) declarative-builder (< 0.2.0) @@ -349,7 +130,8 @@ GEM actionpack (>= 3.0) cells (>= 4.1.6, < 5.0.0) charlock_holmes (0.7.7) - chef-utils (16.10.17) + chef-utils (17.0.242) + concurrent-ruby childprocess (3.0.0) coercible (1.0.0) descendants_tracker (~> 0.0.1) @@ -362,35 +144,258 @@ GEM coffee-script-source (1.12.2) colorize (0.8.1) concurrent-ruby (1.1.8) + cookiejar (0.3.3) crack (0.4.5) rexml crass (1.0.6) css_parser (1.9.0) addressable - daemons (1.3.1) + daemons (1.4.0) date_validator (0.9.0) activemodel activesupport db-query-matchers (0.9.0) activesupport (>= 4.0, <= 6.0) rspec (~> 3.0) + decidim (0.24.2) + decidim-accountability (= 0.24.2) + decidim-admin (= 0.24.2) + decidim-api (= 0.24.2) + decidim-assemblies (= 0.24.2) + decidim-blogs (= 0.24.2) + decidim-budgets (= 0.24.2) + decidim-comments (= 0.24.2) + decidim-core (= 0.24.2) + decidim-debates (= 0.24.2) + decidim-forms (= 0.24.2) + decidim-generators (= 0.24.2) + decidim-meetings (= 0.24.2) + decidim-pages (= 0.24.2) + decidim-participatory_processes (= 0.24.2) + decidim-proposals (= 0.24.2) + decidim-sortitions (= 0.24.2) + decidim-surveys (= 0.24.2) + decidim-system (= 0.24.2) + decidim-templates (= 0.24.2) + decidim-verifications (= 0.24.2) + decidim-accountability (0.24.2) + decidim-comments (= 0.24.2) + decidim-core (= 0.24.2) + kaminari (~> 1.2, >= 1.2.1) + searchlight (~> 4.1) + decidim-admin (0.24.2) + active_link_to (~> 1.0) + decidim-core (= 0.24.2) + devise (~> 4.7) + devise-i18n (~> 1.2) + devise_invitable (~> 1.7) + jquery-rails (~> 4.4) + sassc (~> 2.4.0) + sassc-rails (~> 2.1.2) + decidim-api (0.24.2) + graphiql-rails (~> 1.4, < 1.5) + graphql (~> 1.12, >= 1.12.3) + rack-cors (~> 1.0) + redcarpet (~> 3.5, >= 3.5.1) + sprockets-es6 (~> 0.9.2) + decidim-assemblies (0.24.2) + decidim-core (= 0.24.2) + decidim-blogs (0.24.2) + decidim-admin (= 0.24.2) + decidim-comments (= 0.24.2) + decidim-core (= 0.24.2) + jquery-tmpl-rails (~> 1.1) + kaminari (~> 1.2, >= 1.2.1) + decidim-budgets (0.24.2) + decidim-comments (= 0.24.2) + decidim-core (= 0.24.2) + kaminari (~> 1.2, >= 1.2.1) + searchlight (~> 4.1) + decidim-comments (0.24.2) + decidim-core (= 0.24.2) + jquery-rails (~> 4.4) + redcarpet (~> 3.5, >= 3.5.1) + decidim-conferences (0.24.2) + decidim-core (= 0.24.2) + decidim-meetings (= 0.24.2) + wicked_pdf (~> 1.4) + wkhtmltopdf-binary (~> 0.12) + decidim-consultations (0.24.2) + decidim-admin (= 0.24.2) + decidim-comments (= 0.24.2) + decidim-core (= 0.24.2) + decidim-core (0.24.2) + active_link_to (~> 1.0) + anchored (~> 1.1) + autoprefixer-rails (~> 8.0) + batch-loader (~> 1.2) + browser (~> 2.7) + carrierwave (~> 2.2.1) + cells-erb (~> 0.1.0) + cells-rails (~> 0.0.9) + charlock_holmes (~> 0.7) + date_validator (~> 0.9.0) + decidim-api (= 0.24.2) + devise (~> 4.7) + devise-i18n (~> 1.2) + diffy (~> 3.3) + doorkeeper (~> 5.1) + doorkeeper-i18n (~> 4.0) + etherpad-lite (~> 0.3) + file_validators (~> 2.1) + fog-local (~> 0.6) + foundation-rails (~> 6.6, < 6.7) + foundation_rails_helper (~> 3.0) + geocoder (~> 1.5) + hashdiff (>= 0.4.0, < 2.0.0) + invisible_captcha (~> 0.12) + jquery-rails (~> 4.4) + kaminari (~> 1.2, >= 1.2.1) + loofah (~> 2.3.1) + mini_magick (~> 4.9) + mustache (~> 1.1.0) + nobspw (~> 0.6.0) + omniauth (~> 1.9) + omniauth-facebook (~> 5.0) + omniauth-google-oauth2 (~> 0.7) + omniauth-rails_csrf_protection (~> 0.1) + omniauth-twitter (~> 1.4) + paper_trail (~> 10.3) + pg (~> 1.1.4, < 2) + pg_search (~> 2.2) + premailer-rails (~> 1.10) + rack (~> 2.2, >= 2.2.3) + rack-attack (~> 6.0) + rails (~> 5.2.6) + rails-i18n (~> 5.0) + rectify (~> 0.13.0) + redis (~> 4.1) + request_store (~> 1.5.0) + rubyzip (~> 2.0) + sassc (~> 2.4.0) + sassc-rails (~> 2.1.2) + seven_zip_ruby (~> 1.3) + social-share-button (~> 1.2, >= 1.2.1) + spreadsheet (~> 1.2) + sprockets (~> 3.7, < 4) + sprockets-es6 (~> 0.9.2) + truncato (~> 0.7) + uglifier (~> 4.1) + valid_email2 (~> 2.1) + wisper (~> 2.0) + decidim-debates (0.24.2) + decidim-comments (= 0.24.2) + decidim-core (= 0.24.2) + kaminari (~> 1.2, >= 1.2.1) + searchlight (~> 4.1) + decidim-dev (0.24.2) + byebug (~> 11.0) + capybara (~> 3.24) + db-query-matchers (~> 0.9.0) + decidim (= 0.24.2) + erb_lint (~> 0.0.28) + factory_bot_rails (~> 4.8) + i18n-tasks (~> 0.9.18) + mdl (~> 0.5) + nokogiri (~> 1.11, >= 1.11.1) + puffing-billy (~> 2.4.0) + puma (~> 5.0) + rails-controller-testing (~> 1.0) + rspec-cells (~> 0.3.4) + rspec-html-matchers (~> 0.9.1) + rspec-rails (~> 3.7) + rspec-retry (~> 0.6.2) + rspec_junit_formatter (~> 0.3.0) + rubocop (~> 0.92.0) + rubocop-rails (~> 2.0) + rubocop-rspec (~> 1.21) + selenium-webdriver (~> 3.142) + simplecov (~> 0.19.0) + simplecov-cobertura (~> 1.3.1) + system_test_html_screenshots (~> 0.1.1) + vcr (~> 6.0) + webmock (~> 3.6) + wisper-rspec (~> 1.0) + decidim-forms (0.24.2) + decidim-core (= 0.24.2) + wicked_pdf (~> 1.4) + wkhtmltopdf-binary (~> 0.12) + decidim-generators (0.24.2) + decidim-core (= 0.24.2) + decidim-initiatives (0.24.2) + decidim-admin (= 0.24.2) + decidim-comments (= 0.24.2) + decidim-core (= 0.24.2) + decidim-verifications (= 0.24.2) + kaminari (~> 1.2, >= 1.2.1) + origami (~> 2.1) + virtus-multiparams (~> 0.1) + wicked (~> 1.3) + wicked_pdf (~> 1.4) + wkhtmltopdf-binary (~> 0.12) + decidim-meetings (0.24.2) + cells-erb (~> 0.1.0) + cells-rails (~> 0.0.9) + decidim-core (= 0.24.2) + decidim-forms (= 0.24.2) + icalendar (~> 2.5) + jquery-tmpl-rails (~> 1.1) + kaminari (~> 1.2, >= 1.2.1) + searchlight (~> 4.1) + decidim-pages (0.24.2) + decidim-core (= 0.24.2) + decidim-participatory_processes (0.24.2) + decidim-core (= 0.24.2) + decidim-proposals (0.24.2) + acts_as_list (~> 0.9) + cells-erb (~> 0.1.0) + cells-rails (~> 0.0.9) + decidim-comments (= 0.24.2) + decidim-core (= 0.24.2) + doc2text (~> 0.4.3) + kaminari (~> 1.2, >= 1.2.1) + ransack (~> 2.1.1) + redcarpet (~> 3.5, >= 3.5.1) + decidim-sortitions (0.24.2) + decidim-admin (= 0.24.2) + decidim-comments (= 0.24.2) + decidim-core (= 0.24.2) + decidim-proposals (= 0.24.2) + decidim-surveys (0.24.2) + decidim-core (= 0.24.2) + decidim-forms (= 0.24.2) + decidim-templates (= 0.24.2) + decidim-system (0.24.2) + active_link_to (~> 1.0) + decidim-core (= 0.24.2) + devise (~> 4.7) + devise-i18n (~> 1.2) + devise_invitable (~> 1.7) + jquery-rails (~> 4.4) + sassc (~> 2.4.0) + sassc-rails (~> 2.1.2) + decidim-templates (0.24.2) + decidim-core (= 0.24.2) + decidim-forms (= 0.24.2) + decidim-verifications (0.24.2) + decidim-core (= 0.24.2) declarative-builder (0.1.0) declarative-option (< 0.2.0) declarative-option (0.1.0) delayed_job (4.1.9) activesupport (>= 3.0, < 6.2) - delayed_job_active_record (4.1.4) - activerecord (>= 3.0, < 6.1) + delayed_job_active_record (4.1.6) + activerecord (>= 3.0, < 6.2) delayed_job (>= 3.0, < 5) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - devise (4.7.3) + devise (4.8.0) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-i18n (1.9.2) + devise-i18n (1.9.4) devise (>= 4.7.1) devise_invitable (1.7.5) actionmailer (>= 4.1.0) @@ -403,10 +408,20 @@ GEM docile (1.3.5) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - doorkeeper (5.5.0) + doorkeeper (5.5.1) railties (>= 5) doorkeeper-i18n (4.0.1) ed25519 (1.2.4) + em-http-request (1.1.7) + addressable (>= 2.3.4) + cookiejar (!= 0.3.1) + em-socksify (>= 0.3) + eventmachine (>= 1.0.3) + http_parser.rb (>= 0.6.0) + em-socksify (0.3.2) + eventmachine (>= 1.0.0.beta.4) + em-synchrony (1.0.6) + eventmachine (>= 1.0.0.beta.1) equalizer (0.0.11) erb_lint (0.0.37) activesupport @@ -421,25 +436,40 @@ GEM erubi (1.10.0) etherpad-lite (0.3.0) rest-client (>= 1.6) - execjs (2.7.0) + eventmachine (1.2.7) + eventmachine_httpserver (0.2.1) + excon (0.81.0) + execjs (2.8.0) factory_bot (4.11.1) activesupport (>= 3.0.0) factory_bot_rails (4.11.1) factory_bot (~> 4.11.1) railties (>= 3.0.0) - faker (1.9.6) - i18n (>= 0.7) - faraday (1.3.0) + faker (2.17.0) + i18n (>= 1.6, < 2) + faraday (1.4.1) + faraday-excon (~> 1.1) faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) - ruby2_keywords + ruby2_keywords (>= 0.0.4) + faraday-excon (1.1.0) faraday-net_http (1.0.1) - ffi (1.14.2) + faraday-net_http_persistent (1.1.0) + ffi (1.15.0) figaro (1.2.0) thor (>= 0.14.0, < 2) file_validators (2.3.0) activemodel (>= 3.2) mime-types (>= 1.0) + fog-core (2.2.4) + builder + excon (~> 0.71) + formatador (~> 0.2) + mime-types + fog-local (0.6.0) + fog-core (>= 1.27, < 3.0) + formatador (0.2.5) foundation-rails (6.6.2.0) railties (>= 3.1.0) sass (>= 3.3.0) @@ -450,13 +480,13 @@ GEM activesupport (>= 4.1, < 6.0) railties (>= 4.1, < 6.0) tzinfo (~> 1.2, >= 1.2.2) - geocoder (1.6.5) + geocoder (1.6.7) globalid (0.4.2) activesupport (>= 4.2.0) graphiql-rails (1.4.11) railties sprockets-rails - graphql (1.12.5) + graphql (1.12.9) hashdiff (1.0.1) hashie (4.1.0) highline (2.0.3) @@ -465,12 +495,10 @@ GEM http-accept (1.7.0) http-cookie (1.0.3) domain_name (~> 0.5) - httparty (0.18.1) - mime-types (~> 3.0) - multi_xml (>= 0.5.2) - i18n (1.8.9) + http_parser.rb (0.6.0) + i18n (1.8.10) concurrent-ruby (~> 1.0) - i18n-tasks (0.9.33) + i18n-tasks (0.9.34) activesupport (>= 4.0.2) ast (>= 2.1.0) erubi @@ -480,20 +508,22 @@ GEM rails-i18n rainbow (>= 2.2.2, < 4.0) terminal-table (>= 1.5.1) - icalendar (2.7.0) + icalendar (2.7.1) ice_cube (~> 0.16) ice_cube (0.16.3) ice_nine (0.11.2) + image_processing (1.12.1) + mini_magick (>= 4.9.5, < 5) + ruby-vips (>= 2.0.17, < 3) invisible_captcha (0.13.0) rails (>= 3.2.0) - jaro_winkler (1.5.4) jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-tmpl-rails (1.1.0) rails (>= 3.1.0) - jwt (2.2.2) + jwt (2.2.3) kaminari (1.2.1) activesupport (>= 4.1.0) kaminari-actionview (= 1.2.1) @@ -506,7 +536,7 @@ GEM activerecord kaminari-core (= 1.2.1) kaminari-core (1.2.1) - kramdown (2.3.0) + kramdown (2.3.1) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) @@ -519,7 +549,7 @@ GEM letter_opener (~> 1.0) railties (>= 3.2) libv8 (3.16.14.19) - listen (3.3.3) + listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.3.1) @@ -527,8 +557,7 @@ GEM nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) + marcel (1.0.1) mdl (0.11.0) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) @@ -539,10 +568,9 @@ GEM mime-types (3.3.1) mime-types-data (~> 3.2015) mime-types-data (3.2021.0225) - mimemagic (0.3.5) mini_magick (4.11.0) - mini_mime (1.0.2) - mini_portile2 (2.5.0) + mini_mime (1.1.0) + mini_portile2 (2.5.1) minitest (5.14.4) mixlib-cli (2.1.8) mixlib-config (3.0.9) @@ -557,13 +585,13 @@ GEM net-ssh (>= 2.6.5, < 7.0.0) net-ssh (6.1.0) netrc (0.11.0) - nio4r (2.5.5) + nio4r (2.5.7) nobspw (0.6.2) - nokogiri (1.11.1) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) - oauth (0.5.5) - oauth2 (1.4.4) + oauth (0.5.6) + oauth2 (1.4.7) faraday (>= 0.8, < 2.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) @@ -574,10 +602,10 @@ GEM rack (>= 1.6.2, < 3) omniauth-facebook (5.0.0) omniauth-oauth2 (~> 1.2) - omniauth-google-oauth2 (0.8.1) + omniauth-google-oauth2 (0.8.2) jwt (>= 2.0) oauth2 (~> 1.1) - omniauth (>= 1.1.1) + omniauth (~> 1.1) omniauth-oauth2 (>= 1.6) omniauth-oauth (1.2.0) oauth @@ -598,13 +626,13 @@ GEM activerecord (>= 4.2) request_store (~> 1.1) parallel (1.20.1) - parser (3.0.0.0) + parser (3.0.1.1) ast (~> 2.4.1) pg (1.1.4) pg_search (2.3.5) activerecord (>= 5.2) activesupport (>= 5.2) - premailer (1.14.2) + premailer (1.14.3) addressable css_parser (>= 1.6.0) htmlentities (>= 4.0.0) @@ -612,7 +640,15 @@ GEM actionmailer (>= 3) premailer (~> 1.7, >= 1.7.9) public_suffix (4.0.6) - puma (4.3.7) + puffing-billy (2.4.1) + addressable (~> 2.5) + em-http-request (~> 1.1, >= 1.1.0) + em-synchrony + eventmachine (~> 1.2) + eventmachine_httpserver + http_parser.rb (~> 0.6.0) + multi_json + puma (5.3.0) nio4r (~> 2.0) racc (1.5.2) rack (2.2.3) @@ -622,18 +658,18 @@ GEM rack (>= 2.0.0) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.4.5) - actioncable (= 5.2.4.5) - actionmailer (= 5.2.4.5) - actionpack (= 5.2.4.5) - actionview (= 5.2.4.5) - activejob (= 5.2.4.5) - activemodel (= 5.2.4.5) - activerecord (= 5.2.4.5) - activestorage (= 5.2.4.5) - activesupport (= 5.2.4.5) + rails (5.2.6) + actioncable (= 5.2.6) + actionmailer (= 5.2.6) + actionpack (= 5.2.6) + actionview (= 5.2.6) + activejob (= 5.2.6) + activemodel (= 5.2.6) + activerecord (= 5.2.6) + activestorage (= 5.2.6) + activesupport (= 5.2.6) bundler (>= 1.3.0) - railties (= 5.2.4.5) + railties (= 5.2.6) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -647,9 +683,9 @@ GEM rails-i18n (5.1.3) i18n (>= 0.7, < 2) railties (>= 5.0, < 6) - railties (5.2.4.5) - actionpack (= 5.2.4.5) - activesupport (= 5.2.4.5) + railties (5.2.6) + actionpack (= 5.2.6) + activesupport (= 5.2.6) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) @@ -660,7 +696,7 @@ GEM activerecord (>= 5.0) activesupport (>= 5.0) i18n - rb-fsevent (0.10.4) + rb-fsevent (0.11.0) rb-inotify (0.10.1) ffi (~> 1.0) rectify (0.13.0) @@ -683,7 +719,7 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.2.4) + rexml (3.2.5) rspec (3.9.0) rspec-core (~> 3.9.0) rspec-expectations (~> 3.9.0) @@ -715,20 +751,28 @@ GEM rspec-support (3.9.4) rspec_junit_formatter (0.3.0) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (0.71.0) - jaro_winkler (~> 1.5.1) + rubocop (0.92.0) parallel (~> 1.10) - parser (>= 2.6) + parser (>= 2.7.1.5) rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.7) + rexml + rubocop-ast (>= 0.5.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) - rubocop-rails (2.0.1) + unicode-display_width (>= 1.4.0, < 2.0) + rubocop-ast (1.5.0) + parser (>= 3.0.1.1) + rubocop-rails (2.9.1) + activesupport (>= 4.2.0) rack (>= 1.1) - rubocop (>= 0.70.0) - rubocop-rspec (1.41.0) - rubocop (>= 0.68.1) + rubocop (>= 0.90.0, < 2.0) + rubocop-rspec (1.44.1) + rubocop (~> 0.87) + rubocop-ast (>= 0.7.1) ruby-ole (1.2.12.2) ruby-progressbar (1.11.0) + ruby-vips (2.1.2) + ffi (~> 1.12) ruby2_keywords (0.0.4) rubyzip (2.3.0) sass (3.7.4) @@ -736,7 +780,7 @@ GEM sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sassc (2.3.0) + sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) @@ -745,7 +789,7 @@ GEM sprockets-rails tilt searchlight (4.1.0) - secure_headers (6.3.1) + secure_headers (6.3.2) selenium-webdriver (3.142.7) childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) @@ -757,7 +801,7 @@ GEM simplecov (~> 0.8) simplecov-html (0.12.3) smart_properties (1.15.0) - social-share-button (1.2.3) + social-share-button (1.2.4) coffee-rails spreadsheet (1.2.8) ruby-ole @@ -783,8 +827,8 @@ GEM system_test_html_screenshots (0.1.2) actionpack (>= 5.2, < 6.0.a) temple (0.8.2) - terminal-table (3.0.0) - unicode-display_width (~> 1.1, >= 1.1.1) + terminal-table (3.0.1) + unicode-display_width (>= 1.1.1, < 3) therubyracer (0.12.3) libv8 (~> 3.16.14.15) ref @@ -803,10 +847,11 @@ GEM unf (0.1.4) unf_ext unf_ext (0.0.7.7) - unicode-display_width (1.6.1) + unicode-display_width (1.7.0) valid_email2 (2.3.1) activemodel (>= 3.2) mail (~> 2.5) + vcr (6.0.0) virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) @@ -821,7 +866,7 @@ GEM activemodel (>= 5.0) bindex (>= 0.4.0) railties (>= 5.0) - webmock (3.12.0) + webmock (3.12.2) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -850,20 +895,20 @@ DEPENDENCIES capistrano-rails (~> 1.3) capistrano-rbenv (~> 2.1) capistrano3-delayed-job (~> 1.0) - capistrano3-puma (~> 4.0) + capistrano3-puma (~> 5.0) daemons (~> 1.3) - decidim! - decidim-conferences! - decidim-consultations! - decidim-dev! - decidim-initiatives! + decidim (= 0.24.2) + decidim-conferences (= 0.24.2) + decidim-consultations (= 0.24.2) + decidim-dev (= 0.24.2) + decidim-initiatives (= 0.24.2) delayed_job_active_record (~> 4.1) ed25519 (>= 1.2, < 2.0) - faker (~> 1.8) + faker (~> 2.14) figaro (~> 1.1) letter_opener_web (~> 1.3) listen (~> 3.1) - puma (~> 4.3) + puma (~> 5.0) secure_headers (~> 6.1) spring (~> 2.0) spring-watcher-listen (~> 2.0) @@ -873,7 +918,7 @@ DEPENDENCIES wkhtmltopdf-binary (~> 0.12) RUBY VERSION - ruby 2.6.6p146 + ruby 2.7.1p83 BUNDLED WITH - 1.17.3 + 2.1.4 diff --git a/db/migrate/20210309111325_remove_show_statistics_from_organizations.decidim.rb b/db/migrate/20210309111325_remove_show_statistics_from_organizations.decidim.rb new file mode 100644 index 0000000..cb77c10 --- /dev/null +++ b/db/migrate/20210309111325_remove_show_statistics_from_organizations.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20200929171508) + +class RemoveShowStatisticsFromOrganizations < ActiveRecord::Migration[5.2] + def change + remove_column :decidim_organizations, :show_statistics + end +end diff --git a/db/migrate/20210309111326_create_decidim_user_moderations.decidim.rb b/db/migrate/20210309111326_create_decidim_user_moderations.decidim.rb new file mode 100644 index 0000000..61c5d18 --- /dev/null +++ b/db/migrate/20210309111326_create_decidim_user_moderations.decidim.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201010124755) + +class CreateDecidimUserModerations < ActiveRecord::Migration[5.2] + def change + create_table :decidim_user_moderations do |t| + t.belongs_to :decidim_user, foreign_key: true + t.integer :report_count, default: 0, null: false + + t.timestamps + end + end +end diff --git a/db/migrate/20210309111327_create_decidim_user_reports.decidim.rb b/db/migrate/20210309111327_create_decidim_user_reports.decidim.rb new file mode 100644 index 0000000..79bdadb --- /dev/null +++ b/db/migrate/20210309111327_create_decidim_user_reports.decidim.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201010124756) + +class CreateDecidimUserReports < ActiveRecord::Migration[5.2] + def change + create_table :decidim_user_reports do |t| + t.integer :user_moderation_id, foreign_key: true + t.integer :user_id, null: false + t.string :reason + t.text :details + + t.timestamps + end + add_foreign_key :decidim_user_reports, :decidim_user_moderations, column: :user_moderation_id + add_foreign_key :decidim_user_reports, :decidim_users, column: :user_id + end +end diff --git a/db/migrate/20210309111328_add_suspension_fields_to_decidim_users.decidim.rb b/db/migrate/20210309111328_add_suspension_fields_to_decidim_users.decidim.rb new file mode 100644 index 0000000..d839896 --- /dev/null +++ b/db/migrate/20210309111328_add_suspension_fields_to_decidim_users.decidim.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201010224433) + +class AddSuspensionFieldsToDecidimUsers < ActiveRecord::Migration[5.2] + def change + add_column :decidim_users, :suspended, :boolean, default: false, null: false + add_column :decidim_users, :suspended_at, :datetime + end +end diff --git a/db/migrate/20210309111329_create_decidim_user_suspensions.decidim.rb b/db/migrate/20210309111329_create_decidim_user_suspensions.decidim.rb new file mode 100644 index 0000000..68b453a --- /dev/null +++ b/db/migrate/20210309111329_create_decidim_user_suspensions.decidim.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201011074641) + +class CreateDecidimUserSuspensions < ActiveRecord::Migration[5.2] + def change + create_table :decidim_user_suspensions do |t| + t.belongs_to :decidim_user, foreign_key: true + t.integer :suspending_user_id + t.text :justification + + t.timestamps + end + add_foreign_key :decidim_user_suspensions, :decidim_users, column: :suspending_user_id + end +end diff --git a/db/migrate/20210309111330_add_current_suspension_id_to_decidim_users.decidim.rb b/db/migrate/20210309111330_add_current_suspension_id_to_decidim_users.decidim.rb new file mode 100644 index 0000000..fa5752e --- /dev/null +++ b/db/migrate/20210309111330_add_current_suspension_id_to_decidim_users.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201011081626) + +class AddCurrentSuspensionIdToDecidimUsers < ActiveRecord::Migration[5.2] + def change + add_column :decidim_users, :suspension_id, :integer + end +end diff --git a/db/migrate/20210309111331_add_reported_content_to_moderations.decidim.rb b/db/migrate/20210309111331_add_reported_content_to_moderations.decidim.rb new file mode 100644 index 0000000..d37af03 --- /dev/null +++ b/db/migrate/20210309111331_add_reported_content_to_moderations.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201013071533) + +class AddReportedContentToModerations < ActiveRecord::Migration[5.2] + def change + add_column :decidim_moderations, :reported_content, :text + end +end diff --git a/db/migrate/20210309111332_add_locale_to_moderation_reports.decidim.rb b/db/migrate/20210309111332_add_locale_to_moderation_reports.decidim.rb new file mode 100644 index 0000000..36bca7b --- /dev/null +++ b/db/migrate/20210309111332_add_locale_to_moderation_reports.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201019074554) + +class AddLocaleToModerationReports < ActiveRecord::Migration[5.2] + def change + add_column :decidim_reports, :locale, :string + end +end diff --git a/db/migrate/20210309111333_encrypt_authorization_metadatas.decidim.rb b/db/migrate/20210309111333_encrypt_authorization_metadatas.decidim.rb new file mode 100644 index 0000000..0583061 --- /dev/null +++ b/db/migrate/20210309111333_encrypt_authorization_metadatas.decidim.rb @@ -0,0 +1,36 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201127114444) + +class EncryptAuthorizationMetadatas < ActiveRecord::Migration[5.2] + def up + Decidim::Authorization.all.each do |auth| + # Re-setting these values will internally convert the hash values to + # encypted values + auth.update!( + metadata: auth.metadata, + verification_metadata: auth.verification_metadata + ) + end + end + + def down + Decidim::Authorization.all.each do |auth| + # rubocop:disable Rails/SkipsModelValidations + auth.update_columns( + metadata: decrypt_hash(auth.metadata), + verification_metadata: decrypt_hash(auth.verification_metadata) + ) + # rubocop:enable Rails/SkipsModelValidations + end + end + + private + + def decrypt_hash(hash) + hash.transform_values do |value| + ActiveSupport::JSON.decode(Decidim::AttributeEncryptor.decrypt(value)) + rescue ActiveSupport::MessageEncryptor::InvalidMessage, ActiveSupport::MessageVerifier::InvalidSignature + value + end + end +end diff --git a/db/migrate/20210309111334_add_allow_public_access_to_static_pages.decidim.rb b/db/migrate/20210309111334_add_allow_public_access_to_static_pages.decidim.rb new file mode 100644 index 0000000..5ca91ad --- /dev/null +++ b/db/migrate/20210309111334_add_allow_public_access_to_static_pages.decidim.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201128130723) + +class AddAllowPublicAccessToStaticPages < ActiveRecord::Migration[5.2] + def change + add_column :decidim_static_pages, :allow_public_access, :boolean, null: false, default: false + + reversible do |direction| + direction.up do + # rubocop:disable Rails/SkipsModelValidations + Decidim::StaticPage.where(slug: "terms-and-conditions").update_all( + allow_public_access: true + ) + # rubocop:enable Rails/SkipsModelValidations + end + end + end +end diff --git a/db/migrate/20210309111335_update_table_block_user_functionality.decidim.rb b/db/migrate/20210309111335_update_table_block_user_functionality.decidim.rb new file mode 100644 index 0000000..a5b9c0e --- /dev/null +++ b/db/migrate/20210309111335_update_table_block_user_functionality.decidim.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201218144706) + +class UpdateTableBlockUserFunctionality < ActiveRecord::Migration[5.2] + def change + rename_column :decidim_user_suspensions, :suspending_user_id, :blocking_user_id + rename_table :decidim_user_suspensions, :decidim_user_blocks + end +end diff --git a/db/migrate/20210309111336_rename_decidim_user_fields_for_block_functionality.decidim.rb b/db/migrate/20210309111336_rename_decidim_user_fields_for_block_functionality.decidim.rb new file mode 100644 index 0000000..ef43862 --- /dev/null +++ b/db/migrate/20210309111336_rename_decidim_user_fields_for_block_functionality.decidim.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20201218145252) + +class RenameDecidimUserFieldsForBlockFunctionality < ActiveRecord::Migration[5.2] + def change + rename_column :decidim_users, :suspended, :blocked + rename_column :decidim_users, :suspended_at, :blocked_at + rename_column :decidim_users, :suspension_id, :block_id + end +end diff --git a/db/migrate/20210309111337_add_email_on_moderations_to_users.decidim.rb b/db/migrate/20210309111337_add_email_on_moderations_to_users.decidim.rb new file mode 100644 index 0000000..c04978d --- /dev/null +++ b/db/migrate/20210309111337_add_email_on_moderations_to_users.decidim.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20210208134328) + +class AddEmailOnModerationsToUsers < ActiveRecord::Migration[5.2] + def change + add_column :decidim_users, :email_on_moderations, :boolean, default: true + end +end diff --git a/db/migrate/20210309111338_invalidate_all_sessions_for_deleted_users.decidim.rb b/db/migrate/20210309111338_invalidate_all_sessions_for_deleted_users.decidim.rb new file mode 100644 index 0000000..b4acff9 --- /dev/null +++ b/db/migrate/20210309111338_invalidate_all_sessions_for_deleted_users.decidim.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20210302150803) + +class InvalidateAllSessionsForDeletedUsers < ActiveRecord::Migration[5.2] + def up + Decidim::User.reset_column_information + + Decidim::User.where.not(deleted_at: nil).find_each(&:invalidate_all_sessions!) + end + + def down; end +end diff --git a/db/migrate/20210309111339_add_salt_to_decidim_forms_questionnaires.decidim_forms.rb b/db/migrate/20210309111339_add_salt_to_decidim_forms_questionnaires.decidim_forms.rb new file mode 100644 index 0000000..9af15d6 --- /dev/null +++ b/db/migrate/20210309111339_add_salt_to_decidim_forms_questionnaires.decidim_forms.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_forms (originally 20201110152921) + +class AddSaltToDecidimFormsQuestionnaires < ActiveRecord::Migration[5.2] + class Questionnaire < ApplicationRecord + self.table_name = :decidim_forms_questionnaires + end + + def change + add_column :decidim_forms_questionnaires, :salt, :string + + Questionnaire.find_each do |questionnaire| + questionnaire.salt = Decidim::Tokenizer.random_salt + questionnaire.save! + end + end +end diff --git a/db/migrate/20210309111340_add_max_characters_to_decidim_forms_questions.decidim_forms.rb b/db/migrate/20210309111340_add_max_characters_to_decidim_forms_questions.decidim_forms.rb new file mode 100644 index 0000000..b24ef1e --- /dev/null +++ b/db/migrate/20210309111340_add_max_characters_to_decidim_forms_questions.decidim_forms.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_forms (originally 20210208094442) + +class AddMaxCharactersToDecidimFormsQuestions < ActiveRecord::Migration[5.2] + def change + add_column :decidim_forms_questions, :max_characters, :integer, default: 0 + end +end diff --git a/db/migrate/20210309111341_create_decidim_verifications_conflicts.decidim_verifications.rb b/db/migrate/20210309111341_create_decidim_verifications_conflicts.decidim_verifications.rb new file mode 100644 index 0000000..53b9dab --- /dev/null +++ b/db/migrate/20210309111341_create_decidim_verifications_conflicts.decidim_verifications.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true +# This migration comes from decidim_verifications (originally 20201028161118) + +class CreateDecidimVerificationsConflicts < ActiveRecord::Migration[5.2] + def change + create_table :decidim_verifications_conflicts do |t| + t.references :current_user, index: { name: "authorization_current_user" }, foreign_key: { to_table: :decidim_users } + t.references :managed_user, index: { name: "authorization_managed_user" }, foreign_key: { to_table: :decidim_users } + t.integer :times, default: 0 + t.string :unique_id + t.boolean :solved, default: false + + t.timestamps + end + end +end diff --git a/db/migrate/20210309111342_add_hashtag_to_participatory_process_groups.decidim_participatory_processes.rb b/db/migrate/20210309111342_add_hashtag_to_participatory_process_groups.decidim_participatory_processes.rb new file mode 100644 index 0000000..c6186ca --- /dev/null +++ b/db/migrate/20210309111342_add_hashtag_to_participatory_process_groups.decidim_participatory_processes.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20201007215105) + +class AddHashtagToParticipatoryProcessGroups < ActiveRecord::Migration[5.2] + def change + add_column :decidim_participatory_process_groups, :hashtag, :string + end +end diff --git a/db/migrate/20210309111343_add_metadata_columns_to_participatory_process_groups.decidim_participatory_processes.rb b/db/migrate/20210309111343_add_metadata_columns_to_participatory_process_groups.decidim_participatory_processes.rb new file mode 100644 index 0000000..0efe84f --- /dev/null +++ b/db/migrate/20210309111343_add_metadata_columns_to_participatory_process_groups.decidim_participatory_processes.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20201008154315) + +class AddMetadataColumnsToParticipatoryProcessGroups < ActiveRecord::Migration[5.2] + def change + add_column :decidim_participatory_process_groups, :group_url, :string + add_column :decidim_participatory_process_groups, :developer_group, :jsonb + add_column :decidim_participatory_process_groups, :local_area, :jsonb + add_column :decidim_participatory_process_groups, :meta_scope, :jsonb + add_column :decidim_participatory_process_groups, :target, :jsonb + add_column :decidim_participatory_process_groups, :participatory_scope, :jsonb + add_column :decidim_participatory_process_groups, :participatory_structure, :jsonb + end +end diff --git a/db/migrate/20210309111344_rename_name_column_to_title_in_decidim_participatory_process_groups.decidim_participatory_processes.rb b/db/migrate/20210309111344_rename_name_column_to_title_in_decidim_participatory_process_groups.decidim_participatory_processes.rb new file mode 100644 index 0000000..3efa4e7 --- /dev/null +++ b/db/migrate/20210309111344_rename_name_column_to_title_in_decidim_participatory_process_groups.decidim_participatory_processes.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20201013105520) + +class RenameNameColumnToTitleInDecidimParticipatoryProcessGroups < ActiveRecord::Migration[5.2] + def up + rename_column :decidim_participatory_process_groups, :name, :title + PaperTrail::Version.where(item_type: "Decidim::ParticipatoryProcessGroup").each do |version| + # rubocop:disable Rails/SkipsModelValidations + version.update_attribute(:object_changes, version.object_changes.gsub(/^name:/, "title:")) if version.object_changes.present? + # rubocop:enable Rails/SkipsModelValidations + + next unless version.object.present? && version.object.has_key?("name") + + object = version.object + object["title"] = object.delete("name") + + # rubocop:disable Rails/SkipsModelValidations + version.update_attribute(:object, object) + # rubocop:enable Rails/SkipsModelValidations + end + end + + def down + PaperTrail::Version.where(item_type: "Decidim::ParticipatoryProcessGroup").each do |version| + # rubocop:disable Rails/SkipsModelValidations + version.update_attribute(:object_changes, version.object_changes.gsub(/^title:/, "name:")) if version.object_changes.present? + # rubocop:enable Rails/SkipsModelValidations + + next unless version.object.present? && version.object.has_key?("title") + + object = version.object + object["name"] = object.delete("title") + + # rubocop:disable Rails/SkipsModelValidations + version.update_attribute(:object, object) + # rubocop:enable Rails/SkipsModelValidations + end + rename_column :decidim_participatory_process_groups, :title, :name + end +end diff --git a/db/migrate/20210309111345_add_promoted_flag_to_decidim_participatory_process_groups.decidim_participatory_processes.rb b/db/migrate/20210309111345_add_promoted_flag_to_decidim_participatory_process_groups.decidim_participatory_processes.rb new file mode 100644 index 0000000..e63002a --- /dev/null +++ b/db/migrate/20210309111345_add_promoted_flag_to_decidim_participatory_process_groups.decidim_participatory_processes.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20201030133444) + +class AddPromotedFlagToDecidimParticipatoryProcessGroups < ActiveRecord::Migration[5.2] + def change + add_column :decidim_participatory_process_groups, :promoted, :boolean, default: false, index: true + end +end diff --git a/db/migrate/20210309111346_add_weight_field_to_participatory_processes.decidim_participatory_processes.rb b/db/migrate/20210309111346_add_weight_field_to_participatory_processes.decidim_participatory_processes.rb new file mode 100644 index 0000000..f9a3d2a --- /dev/null +++ b/db/migrate/20210309111346_add_weight_field_to_participatory_processes.decidim_participatory_processes.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20210204154593) + +class AddWeightFieldToParticipatoryProcesses < ActiveRecord::Migration[5.2] + def change + add_column :decidim_participatory_processes, :weight, :integer, null: false, default: true + end +end diff --git a/db/migrate/20210309111347_add_weight_field_to_assembly.decidim_assemblies.rb b/db/migrate/20210309111347_add_weight_field_to_assembly.decidim_assemblies.rb new file mode 100644 index 0000000..d111eb0 --- /dev/null +++ b/db/migrate/20210309111347_add_weight_field_to_assembly.decidim_assemblies.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_assemblies (originally 20210204152393) + +class AddWeightFieldToAssembly < ActiveRecord::Migration[5.2] + def change + add_column :decidim_assemblies, :weight, :integer, null: false, default: true + end +end diff --git a/db/migrate/20210309111348_add_online_meeting_url.decidim_meetings.rb b/db/migrate/20210309111348_add_online_meeting_url.decidim_meetings.rb new file mode 100644 index 0000000..0536c12 --- /dev/null +++ b/db/migrate/20210309111348_add_online_meeting_url.decidim_meetings.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_meetings (originally 20201006140511) + +class AddOnlineMeetingUrl < ActiveRecord::Migration[5.2] + def change + add_column :decidim_meetings_meetings, :online_meeting_url, :string + end +end diff --git a/db/migrate/20210309111349_add_type_of_meeting.decidim_meetings.rb b/db/migrate/20210309111349_add_type_of_meeting.decidim_meetings.rb new file mode 100644 index 0000000..a429f88 --- /dev/null +++ b/db/migrate/20210309111349_add_type_of_meeting.decidim_meetings.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_meetings (originally 20201009124057) + +class AddTypeOfMeeting < ActiveRecord::Migration[5.2] + def change + add_column :decidim_meetings_meetings, :type_of_meeting, :string, default: "in_person" + end +end diff --git a/db/migrate/20210309111350_add_registration_type_and_url_to_meetings.decidim_meetings.rb b/db/migrate/20210309111350_add_registration_type_and_url_to_meetings.decidim_meetings.rb new file mode 100644 index 0000000..e564d4a --- /dev/null +++ b/db/migrate/20210309111350_add_registration_type_and_url_to_meetings.decidim_meetings.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true +# This migration comes from decidim_meetings (originally 20201016112641) + +class AddRegistrationTypeAndUrlToMeetings < ActiveRecord::Migration[5.2] + class Meetings < ApplicationRecord + self.table_name = :decidim_meetings_meetings + include Decidim::HasComponent + end + + def change + add_column :decidim_meetings_meetings, :registration_type, :string, null: false, default: "registration_disabled" + add_column :decidim_meetings_meetings, :registration_url, :string + + Meetings.reset_column_information + Meetings.find_each do |meeting| + meeting.registration_type = "on_this_platform" if meeting.decidim_author_type == "Decidim::Organization" + meeting.save! + end + end +end diff --git a/db/migrate/20210309111351_add_salt_to_decidim_meetings.decidim_meetings.rb b/db/migrate/20210309111351_add_salt_to_decidim_meetings.decidim_meetings.rb new file mode 100644 index 0000000..d715040 --- /dev/null +++ b/db/migrate/20210309111351_add_salt_to_decidim_meetings.decidim_meetings.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true +# This migration comes from decidim_meetings (originally 20201111133246) + +class AddSaltToDecidimMeetings < ActiveRecord::Migration[5.2] + def change + add_column :decidim_meetings_meetings, :salt, :string + # we leave old entries empty to maintain the old pad reference + end +end diff --git a/db/migrate/20210309111352_fix_answered_proposals_after_copy.decidim_proposals.rb b/db/migrate/20210309111352_fix_answered_proposals_after_copy.decidim_proposals.rb new file mode 100644 index 0000000..93105d8 --- /dev/null +++ b/db/migrate/20210309111352_fix_answered_proposals_after_copy.decidim_proposals.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20210127115628) + +class FixAnsweredProposalsAfterCopy < ActiveRecord::Migration[5.2] + def change + proposals_after_copy = Decidim::ResourceLink.where(from_type: "Decidim::Proposals::Proposal").pluck(:from_id) + + result = Decidim::Proposals::Proposal.where.not(state_published_at: nil).where(state: nil, id: proposals_after_copy) + + result.find_each do |proposal| + proposal.state_published_at = nil + proposal.save! + end + end +end diff --git a/db/migrate/20210309111353_add_scope_to_debates_debate.decidim_debates.rb b/db/migrate/20210309111353_add_scope_to_debates_debate.decidim_debates.rb new file mode 100644 index 0000000..2aa4596 --- /dev/null +++ b/db/migrate/20210309111353_add_scope_to_debates_debate.decidim_debates.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_debates (originally 20200930145546) + +class AddScopeToDebatesDebate < ActiveRecord::Migration[5.2] + def change + add_reference :decidim_debates_debates, :decidim_scope, foreign_key: true, index: true + end +end diff --git a/db/migrate/20210309111354_archive_debates.decidim_debates.rb b/db/migrate/20210309111354_archive_debates.decidim_debates.rb new file mode 100644 index 0000000..886ddff --- /dev/null +++ b/db/migrate/20210309111354_archive_debates.decidim_debates.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true +# This migration comes from decidim_debates (originally 20201126112752) + +class ArchiveDebates < ActiveRecord::Migration[5.2] + def change + add_column :decidim_debates_debates, :archived_at, :datetime + add_index :decidim_debates_debates, :archived_at + end +end diff --git a/db/migrate/20210309111355_revert_archive_debates.decidim_debates.rb b/db/migrate/20210309111355_revert_archive_debates.decidim_debates.rb new file mode 100644 index 0000000..a543242 --- /dev/null +++ b/db/migrate/20210309111355_revert_archive_debates.decidim_debates.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true +# This migration comes from decidim_debates (originally 20210125101735) + +class RevertArchiveDebates < ActiveRecord::Migration[5.2] + def change + remove_index :decidim_debates_debates, :archived_at + remove_column :decidim_debates_debates, :archived_at + end +end diff --git a/db/migrate/20210505115337_add_followable_counter_cache_to_users.decidim.rb b/db/migrate/20210505115337_add_followable_counter_cache_to_users.decidim.rb new file mode 100644 index 0000000..1f0e002 --- /dev/null +++ b/db/migrate/20210505115337_add_followable_counter_cache_to_users.decidim.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim (originally 20210310120640) + +class AddFollowableCounterCacheToUsers < ActiveRecord::Migration[5.2] + def change + add_column :decidim_users, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::User.reset_column_information + Decidim::User.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115338_add_followable_counter_cache_to_participatory_processes.decidim_participatory_processes.rb b/db/migrate/20210505115338_add_followable_counter_cache_to_participatory_processes.decidim_participatory_processes.rb new file mode 100644 index 0000000..188adcd --- /dev/null +++ b/db/migrate/20210505115338_add_followable_counter_cache_to_participatory_processes.decidim_participatory_processes.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_participatory_processes (originally 20210310120750) + +class AddFollowableCounterCacheToParticipatoryProcesses < ActiveRecord::Migration[5.2] + def change + add_column :decidim_participatory_processes, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::ParticipatoryProcess.reset_column_information + Decidim::ParticipatoryProcess.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115339_add_followable_counter_cache_to_assemblies.decidim_assemblies.rb b/db/migrate/20210505115339_add_followable_counter_cache_to_assemblies.decidim_assemblies.rb new file mode 100644 index 0000000..f56e5f3 --- /dev/null +++ b/db/migrate/20210505115339_add_followable_counter_cache_to_assemblies.decidim_assemblies.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_assemblies (originally 20210310120444) + +class AddFollowableCounterCacheToAssemblies < ActiveRecord::Migration[5.2] + def change + add_column :decidim_assemblies, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Assembly.reset_column_information + Decidim::Assembly.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115340_add_followable_counter_cache_to_meetings.decidim_meetings.rb b/db/migrate/20210505115340_add_followable_counter_cache_to_meetings.decidim_meetings.rb new file mode 100644 index 0000000..fa6d924 --- /dev/null +++ b/db/migrate/20210505115340_add_followable_counter_cache_to_meetings.decidim_meetings.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_meetings (originally 20210310120731) + +class AddFollowableCounterCacheToMeetings < ActiveRecord::Migration[5.2] + def change + add_column :decidim_meetings_meetings, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Meetings::Meeting.reset_column_information + Decidim::Meetings::Meeting.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115341_add_followable_counter_cache_to_proposals.decidim_proposals.rb b/db/migrate/20210505115341_add_followable_counter_cache_to_proposals.decidim_proposals.rb new file mode 100644 index 0000000..0eb81ad --- /dev/null +++ b/db/migrate/20210505115341_add_followable_counter_cache_to_proposals.decidim_proposals.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20210310102839) + +class AddFollowableCounterCacheToProposals < ActiveRecord::Migration[5.2] + def change + add_column :decidim_proposals_proposals, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Proposals::Proposal.reset_column_information + Decidim::Proposals::Proposal.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115342_add_followable_counter_cache_to_collaborative_drafts.decidim_proposals.rb b/db/migrate/20210505115342_add_followable_counter_cache_to_collaborative_drafts.decidim_proposals.rb new file mode 100644 index 0000000..1d9209c --- /dev/null +++ b/db/migrate/20210505115342_add_followable_counter_cache_to_collaborative_drafts.decidim_proposals.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20210310120812) + +class AddFollowableCounterCacheToCollaborativeDrafts < ActiveRecord::Migration[5.2] + def change + add_column :decidim_proposals_collaborative_drafts, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Proposals::CollaborativeDraft.reset_column_information + Decidim::Proposals::CollaborativeDraft.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115343_fix_counters_for_copied_proposals.decidim_proposals.rb b/db/migrate/20210505115343_fix_counters_for_copied_proposals.decidim_proposals.rb new file mode 100644 index 0000000..505c8ef --- /dev/null +++ b/db/migrate/20210505115343_fix_counters_for_copied_proposals.decidim_proposals.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true +# This migration comes from decidim_proposals (originally 20210318082934) + +class FixCountersForCopiedProposals < ActiveRecord::Migration[5.2] + def up + copies_ids = Decidim::ResourceLink.where( + name: "copied_from_component", + from_type: "Decidim::Proposals::Proposal", + to_type: "Decidim::Proposals::Proposal" + ).pluck(:to_id) + + Decidim::Proposals::Proposal.where(id: copies_ids).find_each do |record| + record.class.reset_counters(record.id, :follows) + record.update_comments_count + end + end + + def down; end +end diff --git a/db/migrate/20210505115344_add_followable_counter_cache_to_budgets.decidim_budgets.rb b/db/migrate/20210505115344_add_followable_counter_cache_to_budgets.decidim_budgets.rb new file mode 100644 index 0000000..8b8d045 --- /dev/null +++ b/db/migrate/20210505115344_add_followable_counter_cache_to_budgets.decidim_budgets.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_budgets (originally 20210310120613) + +class AddFollowableCounterCacheToBudgets < ActiveRecord::Migration[5.2] + def change + add_column :decidim_budgets_projects, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Budgets::Project.reset_column_information + Decidim::Budgets::Project.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115345_add_followable_counter_cache_to_debates.decidim_debates.rb b/db/migrate/20210505115345_add_followable_counter_cache_to_debates.decidim_debates.rb new file mode 100644 index 0000000..a91eb4d --- /dev/null +++ b/db/migrate/20210505115345_add_followable_counter_cache_to_debates.decidim_debates.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_debates (originally 20210310120652) + +class AddFollowableCounterCacheToDebates < ActiveRecord::Migration[5.2] + def change + add_column :decidim_debates_debates, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Debates::Debate.reset_column_information + Decidim::Debates::Debate.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115346_add_followable_counter_cache_to_blogs.decidim_blogs.rb b/db/migrate/20210505115346_add_followable_counter_cache_to_blogs.decidim_blogs.rb new file mode 100644 index 0000000..6542c75 --- /dev/null +++ b/db/migrate/20210505115346_add_followable_counter_cache_to_blogs.decidim_blogs.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_blogs (originally 20210310120514) + +class AddFollowableCounterCacheToBlogs < ActiveRecord::Migration[5.2] + def change + add_column :decidim_blogs_posts, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Blogs::Post.reset_column_information + Decidim::Blogs::Post.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115347_add_followable_counter_cache_to_conferences.decidim_conferences.rb b/db/migrate/20210505115347_add_followable_counter_cache_to_conferences.decidim_conferences.rb new file mode 100644 index 0000000..af5594a --- /dev/null +++ b/db/migrate/20210505115347_add_followable_counter_cache_to_conferences.decidim_conferences.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_conferences (originally 20210310134942) + +class AddFollowableCounterCacheToConferences < ActiveRecord::Migration[5.2] + def change + add_column :decidim_conferences, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Conference.reset_column_information + Decidim::Conference.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115348_add_followable_counter_cache_to_consultations.decidim_consultations.rb b/db/migrate/20210505115348_add_followable_counter_cache_to_consultations.decidim_consultations.rb new file mode 100644 index 0000000..ab2331e --- /dev/null +++ b/db/migrate/20210505115348_add_followable_counter_cache_to_consultations.decidim_consultations.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_consultations (originally 20210310120626) + +class AddFollowableCounterCacheToConsultations < ActiveRecord::Migration[5.2] + def change + add_column :decidim_consultations_questions, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Consultations::Question.reset_column_information + Decidim::Consultations::Question.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/migrate/20210505115349_add_followable_counter_cache_to_initiatives.decidim_initiatives.rb b/db/migrate/20210505115349_add_followable_counter_cache_to_initiatives.decidim_initiatives.rb new file mode 100644 index 0000000..b39688a --- /dev/null +++ b/db/migrate/20210505115349_add_followable_counter_cache_to_initiatives.decidim_initiatives.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true +# This migration comes from decidim_initiatives (originally 20210310120720) + +class AddFollowableCounterCacheToInitiatives < ActiveRecord::Migration[5.2] + def change + add_column :decidim_initiatives, :follows_count, :integer, null: false, default: 0, index: true + + reversible do |dir| + dir.up do + Decidim::Initiative.reset_column_information + Decidim::Initiative.find_each do |record| + record.class.reset_counters(record.id, :follows) + end + end + end + end +end diff --git a/db/schema.rb b/db/schema.rb index f816fd6..7e98d87 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_12_03_083797) do +ActiveRecord::Schema.define(version: 2021_05_05_115349) do # These are extensions that must be enabled in order to support this database enable_extension "ltree" @@ -170,6 +170,8 @@ t.string "youtube_handler" t.string "github_handler" t.bigint "decidim_assemblies_type_id" + t.integer "weight", default: 1, null: false + t.integer "follows_count", default: 0, null: false t.index ["decidim_area_id"], name: "index_decidim_assemblies_on_decidim_area_id" t.index ["decidim_assemblies_type_id"], name: "index_decidim_assemblies_on_decidim_assemblies_type_id" t.index ["decidim_organization_id", "slug"], name: "index_unique_assembly_slug_and_organization", unique: true @@ -273,6 +275,7 @@ t.integer "decidim_user_group_id" t.integer "endorsements_count", default: 0, null: false t.integer "comments_count", default: 0, null: false + t.integer "follows_count", default: 0, null: false t.index ["decidim_author_id", "decidim_author_type"], name: "index_decidim_blogs_posts_on_decidim_author" t.index ["decidim_component_id"], name: "index_decidim_blogs_posts_on_decidim_component_id" t.index ["decidim_user_group_id"], name: "index_decidim_blogs_posts_on_decidim_user_group_id" @@ -320,6 +323,7 @@ t.bigint "decidim_budgets_budget_id" t.date "selected_at" t.integer "comments_count", default: 0, null: false + t.integer "follows_count", default: 0, null: false t.index ["decidim_budgets_budget_id"], name: "index_decidim_budgets_projects_on_decidim_budgets_budget_id" t.index ["decidim_scope_id"], name: "index_decidim_budgets_projects_on_decidim_scope_id" end @@ -469,6 +473,7 @@ t.string "main_logo" t.date "sign_date" t.datetime "diploma_sent_at" + t.integer "follows_count", default: 0, null: false t.index ["decidim_organization_id", "slug"], name: "index_unique_conference_slug_and_organization", unique: true t.index ["decidim_organization_id"], name: "index_decidim_conferences_on_decidim_organization_id" t.index ["decidim_scope_id"], name: "index_decidim_conferences_on_decidim_scope_id" @@ -601,6 +606,7 @@ t.jsonb "instructions" t.integer "response_groups_count", default: 0, null: false t.integer "comments_count", default: 0, null: false + t.integer "follows_count", default: 0, null: false t.index ["decidim_consultation_id"], name: "index_consultations_questions_on_consultation_id" t.index ["decidim_organization_id", "slug"], name: "index_unique_question_slug_and_organization", unique: true t.index ["decidim_scope_id"], name: "index_decidim_consultations_questions_on_decidim_scope_id" @@ -689,9 +695,12 @@ t.datetime "last_comment_at" t.integer "last_comment_by_id" t.string "last_comment_by_type" + t.bigint "decidim_scope_id" + t.integer "follows_count", default: 0, null: false t.index ["closed_at"], name: "index_decidim_debates_debates_on_closed_at" t.index ["decidim_author_id", "decidim_author_type"], name: "index_decidim_debates_debates_on_decidim_author" t.index ["decidim_component_id"], name: "index_decidim_debates_debates_on_decidim_component_id" + t.index ["decidim_scope_id"], name: "index_decidim_debates_debates_on_decidim_scope_id" t.index ["decidim_user_group_id"], name: "index_decidim_debates_debates_on_decidim_user_group_id" t.index ["endorsements_count"], name: "idx_decidim_debates_debates_on_endorsemnts_count" end @@ -786,6 +795,7 @@ t.datetime "published_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "salt" t.index ["questionnaire_for_type", "questionnaire_for_id"], name: "index_decidim_forms_questionnaires_questionnaire_for" end @@ -799,6 +809,7 @@ t.integer "max_choices" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.integer "max_characters", default: 0 t.index ["decidim_questionnaire_id"], name: "index_decidim_forms_questions_on_decidim_questionnaire_id" t.index ["position"], name: "index_decidim_forms_questions_on_position" end @@ -870,6 +881,7 @@ t.jsonb "online_votes", default: {} t.jsonb "offline_votes", default: {} t.integer "comments_count", default: 0, null: false + t.integer "follows_count", default: 0, null: false t.index "md5((description)::text)", name: "decidim_initiatives_description_search" t.index ["answered_at"], name: "index_decidim_initiatives_on_answered_at" t.index ["decidim_area_id"], name: "index_decidim_initiatives_on_decidim_area_id" @@ -1004,6 +1016,12 @@ t.string "decidim_author_type" t.integer "decidim_user_group_id" t.integer "comments_count", default: 0, null: false + t.string "online_meeting_url" + t.string "type_of_meeting", default: "in_person" + t.string "registration_type", default: "registration_disabled", null: false + t.string "registration_url" + t.string "salt" + t.integer "follows_count", default: 0, null: false t.index ["decidim_author_id", "decidim_author_type"], name: "index_decidim_meetings_meetings_on_author" t.index ["decidim_author_id"], name: "index_decidim_meetings_meetings_on_decidim_author_id" t.index ["decidim_component_id"], name: "index_decidim_meetings_meetings_on_decidim_component_id" @@ -1107,6 +1125,7 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "decidim_participatory_space_type", null: false + t.text "reported_content" t.index ["decidim_participatory_space_id", "decidim_participatory_space_type"], name: "decidim_moderations_participatory_space" t.index ["decidim_reportable_type", "decidim_reportable_id"], name: "decidim_moderations_reportable", unique: true t.index ["hidden_at"], name: "decidim_moderations_hidden_at" @@ -1150,7 +1169,6 @@ t.jsonb "description" t.string "logo" t.string "twitter_handler" - t.boolean "show_statistics", default: true t.string "favicon" t.string "instagram_handler" t.string "facebook_handler" @@ -1209,12 +1227,21 @@ end create_table "decidim_participatory_process_groups", id: :serial, force: :cascade do |t| - t.jsonb "name", null: false + t.jsonb "title", null: false t.jsonb "description", null: false t.string "hero_image" t.integer "decidim_organization_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "hashtag" + t.string "group_url" + t.jsonb "developer_group" + t.jsonb "local_area" + t.jsonb "meta_scope" + t.jsonb "target" + t.jsonb "participatory_scope" + t.jsonb "participatory_structure" + t.boolean "promoted", default: false t.index ["decidim_organization_id"], name: "decidim_participatory_process_group_organization" end @@ -1278,6 +1305,8 @@ t.bigint "decidim_area_id" t.bigint "decidim_scope_type_id" t.boolean "show_metrics", default: true + t.integer "weight", default: 1, null: false + t.integer "follows_count", default: 0, null: false t.index ["decidim_area_id"], name: "index_decidim_participatory_processes_on_decidim_area_id" t.index ["decidim_organization_id", "slug"], name: "index_unique_process_slug_and_organization", unique: true t.index ["decidim_organization_id"], name: "index_decidim_processes_on_decidim_organization_id" @@ -1335,6 +1364,7 @@ t.datetime "updated_at", null: false t.integer "coauthorships_count", default: 0, null: false t.integer "comments_count", default: 0, null: false + t.integer "follows_count", default: 0, null: false t.index ["body"], name: "decidim_proposals_collaborative_draft_body_search" t.index ["decidim_component_id"], name: "decidim_proposals_collaborative_drafts_on_decidim_component_id" t.index ["decidim_scope_id"], name: "decidim_proposals_collaborative_drafts_on_decidim_scope_id" @@ -1401,6 +1431,7 @@ t.jsonb "title" t.jsonb "body" t.integer "comments_count", default: 0, null: false + t.integer "follows_count", default: 0, null: false t.index "md5((body)::text)", name: "decidim_proposals_proposal_body_search" t.index "md5((title)::text)", name: "decidim_proposals_proposal_title_search" t.index ["created_at"], name: "index_decidim_proposals_proposals_on_created_at" @@ -1427,6 +1458,7 @@ t.text "details" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.string "locale" t.index ["decidim_moderation_id", "decidim_user_id"], name: "decidim_reports_moderation_user_unique", unique: true t.index ["decidim_moderation_id"], name: "decidim_reports_moderation" t.index ["decidim_user_id"], name: "decidim_reports_user" @@ -1558,6 +1590,7 @@ t.integer "weight" t.boolean "show_in_footer", default: false, null: false t.bigint "topic_id" + t.boolean "allow_public_access", default: false, null: false t.index ["decidim_organization_id"], name: "index_decidim_static_pages_on_decidim_organization_id" t.index ["topic_id"], name: "index_decidim_static_pages_on_topic_id" end @@ -1606,6 +1639,15 @@ t.index ["translation_set_id"], name: "decidim_term_customizer_translation_translation_set" end + create_table "decidim_user_blocks", force: :cascade do |t| + t.bigint "decidim_user_id" + t.integer "blocking_user_id" + t.text "justification" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["decidim_user_id"], name: "index_decidim_user_blocks_on_decidim_user_id" + end + create_table "decidim_user_group_memberships", id: :serial, force: :cascade do |t| t.integer "decidim_user_id", null: false t.integer "decidim_user_group_id", null: false @@ -1619,6 +1661,23 @@ t.index ["role", "decidim_user_group_id"], name: "decidim_group_membership_one_creator_per_group", unique: true, where: "((role)::text = 'creator'::text)" end + create_table "decidim_user_moderations", force: :cascade do |t| + t.bigint "decidim_user_id" + t.integer "report_count", default: 0, null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["decidim_user_id"], name: "index_decidim_user_moderations_on_decidim_user_id" + end + + create_table "decidim_user_reports", force: :cascade do |t| + t.integer "user_moderation_id" + t.integer "user_id", null: false + t.string "reason" + t.text "details" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "decidim_users", id: :serial, force: :cascade do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false @@ -1673,6 +1732,11 @@ t.datetime "admin_terms_accepted_at" t.string "session_token" t.string "direct_message_types", default: "all", null: false + t.boolean "blocked", default: false, null: false + t.datetime "blocked_at" + t.integer "block_id" + t.boolean "email_on_moderations", default: true + t.integer "follows_count", default: 0, null: false t.index ["confirmation_token"], name: "index_decidim_users_on_confirmation_token", unique: true t.index ["decidim_organization_id"], name: "index_decidim_users_on_decidim_organization_id" t.index ["email", "decidim_organization_id"], name: "index_decidim_users_on_email_and_decidim_organization_id", unique: true, where: "((deleted_at IS NULL) AND (managed = false) AND ((type)::text = 'Decidim::User'::text))" @@ -1687,6 +1751,18 @@ t.index ["unlock_token"], name: "index_decidim_users_on_unlock_token", unique: true end + create_table "decidim_verifications_conflicts", force: :cascade do |t| + t.bigint "current_user_id" + t.bigint "managed_user_id" + t.integer "times", default: 0 + t.string "unique_id" + t.boolean "solved", default: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["current_user_id"], name: "authorization_current_user" + t.index ["managed_user_id"], name: "authorization_managed_user" + end + create_table "decidim_verifications_csv_data", force: :cascade do |t| t.string "email" t.bigint "decidim_organization_id" @@ -1785,6 +1861,7 @@ add_foreign_key "decidim_consultations_responses", "decidim_consultations_questions", column: "decidim_consultations_questions_id" add_foreign_key "decidim_consultations_responses", "decidim_consultations_response_groups" add_foreign_key "decidim_consultations_votes", "decidim_consultations_responses" + add_foreign_key "decidim_debates_debates", "decidim_scopes" add_foreign_key "decidim_identities", "decidim_organizations" add_foreign_key "decidim_newsletters", "decidim_users", column: "author_id" add_foreign_key "decidim_participatory_process_steps", "decidim_participatory_processes" @@ -1798,7 +1875,14 @@ add_foreign_key "decidim_term_customizer_constraints", "decidim_organizations" add_foreign_key "decidim_term_customizer_constraints", "decidim_term_customizer_translation_sets", column: "translation_set_id" add_foreign_key "decidim_term_customizer_translations", "decidim_term_customizer_translation_sets", column: "translation_set_id" + add_foreign_key "decidim_user_blocks", "decidim_users" + add_foreign_key "decidim_user_blocks", "decidim_users", column: "blocking_user_id" + add_foreign_key "decidim_user_moderations", "decidim_users" + add_foreign_key "decidim_user_reports", "decidim_user_moderations", column: "user_moderation_id" + add_foreign_key "decidim_user_reports", "decidim_users", column: "user_id" add_foreign_key "decidim_users", "decidim_organizations" + 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 "oauth_access_grants", "decidim_users", column: "resource_owner_id" add_foreign_key "oauth_access_grants", "oauth_applications", column: "application_id" diff --git a/db/seeds.rb b/db/seeds.rb index f717af6..2a9f3d4 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -8,6 +8,4 @@ # You can remove the 'faker' gem if you don't want Decidim seeds. # -require "decidim/faker/localized" - Decidim.seed!