From f935e963d583ba5165cd1c71c3609b2c6d8b199a Mon Sep 17 00:00:00 2001 From: Robin Steiner Date: Tue, 22 Oct 2024 12:50:34 +0200 Subject: [PATCH 1/2] Add guest_meeting_registration gem and execute install steps --- Gemfile | 1 + Gemfile.lock | 11 ++++++ ...ings.decidim_guest_meeting_registration.rb | 13 +++++++ ...ings.decidim_guest_meeting_registration.rb | 8 ++++ ...ests.decidim_guest_meeting_registration.rb | 18 +++++++++ ...ests.decidim_guest_meeting_registration.rb | 9 +++++ ...ings.decidim_guest_meeting_registration.rb | 8 ++++ ...ests.decidim_guest_meeting_registration.rb | 8 ++++ ...ests.decidim_guest_meeting_registration.rb | 8 ++++ ...ings.decidim_guest_meeting_registration.rb | 8 ++++ db/schema.rb | 37 ++++++++++++++++++- 11 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20241022104747_create_guest_meeting_registration_settings.decidim_guest_meeting_registration.rb create mode 100644 db/migrate/20241022104748_add_confirmation_settings.decidim_guest_meeting_registration.rb create mode 100644 db/migrate/20241022104749_create_guest_meeting_registration_registration_requests.decidim_guest_meeting_registration.rb create mode 100644 db/migrate/20241022104750_add_confirmation_to_register_requests.decidim_guest_meeting_registration.rb create mode 100644 db/migrate/20241022104751_add_cancellation_settings.decidim_guest_meeting_registration.rb create mode 100644 db/migrate/20241022104752_add_cancellation_to_register_requests.decidim_guest_meeting_registration.rb create mode 100644 db/migrate/20241022104753_add_session_token_to_register_requests.decidim_guest_meeting_registration.rb create mode 100644 db/migrate/20241022104754_add_disable_normal_account_to_register_settings.decidim_guest_meeting_registration.rb diff --git a/Gemfile b/Gemfile index f9cc26c..3216eb1 100644 --- a/Gemfile +++ b/Gemfile @@ -17,6 +17,7 @@ gem 'decidim-templates', DECIDIM_VERSION gem 'decidim-anonymous_codes', github: 'openpoke/decidim-module-anonymous_codes' gem 'decidim-antivirus', github: 'mainio/decidim-module-antivirus', branch: 'release/0.27-stable' gem 'decidim-decidim_awesome', github: 'decidim-ice/decidim-module-decidim_awesome' +gem 'decidim-guest_meeting_registration', github: 'alecslupu-pfa/guest-meeting-registration', branch: 'release/0.27-stable' gem 'decidim-jitsi_meetings', github: 'puzzle/decidim-module-jitsi-meetings', branch: DECIDIM_VERSION gem 'decidim-question_captcha', github: 'OpenSourcePolitics/decidim-module-question_captcha', branch: 'release/0.27-stable' gem 'decidim-reporting_proposals', github: 'openpoke/decidim-module-reporting-proposals', branch: 'main' diff --git a/Gemfile.lock b/Gemfile.lock index 7de09a5..8f7155e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -17,6 +17,16 @@ GIT decidim-admin (>= 0.27, < 0.28) decidim-core (>= 0.27, < 0.28) +GIT + remote: https://github.com/alecslupu-pfa/guest-meeting-registration.git + revision: 9610e6da08535083e4abb3db185a834aba9d3456 + branch: release/0.27-stable + specs: + decidim-guest_meeting_registration (0.27.7) + decidim-core (~> 0.27) + decidim-meetings (~> 0.27) + deface (>= 1.9) + GIT remote: https://github.com/decidim-ice/decidim-module-decidim_awesome.git revision: 2a34c57248150d7c7eae77bd1ba7c64f211d60b7 @@ -1019,6 +1029,7 @@ DEPENDENCIES decidim-conferences (= 0.27.5) decidim-decidim_awesome! decidim-dev (= 0.27.5) + decidim-guest_meeting_registration! decidim-initiatives (= 0.27.5) decidim-jitsi_meetings! decidim-navigation_maps! diff --git a/db/migrate/20241022104747_create_guest_meeting_registration_settings.decidim_guest_meeting_registration.rb b/db/migrate/20241022104747_create_guest_meeting_registration_settings.decidim_guest_meeting_registration.rb new file mode 100644 index 0000000..0b0c557 --- /dev/null +++ b/db/migrate/20241022104747_create_guest_meeting_registration_settings.decidim_guest_meeting_registration.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +# This migration comes from decidim_guest_meeting_registration (originally 20240820021907) + +class CreateGuestMeetingRegistrationSettings < ActiveRecord::Migration[6.0] + def change + create_table :decidim_guest_meeting_registration_settings do |t| + t.boolean :enable_guest_registration, default: false + t.references :decidim_organization, foreign_key: true, index: { name: :index_guest_meeting_registration_settings_on_organization_id } + + t.timestamps + end + end +end diff --git a/db/migrate/20241022104748_add_confirmation_settings.decidim_guest_meeting_registration.rb b/db/migrate/20241022104748_add_confirmation_settings.decidim_guest_meeting_registration.rb new file mode 100644 index 0000000..9bc90ec --- /dev/null +++ b/db/migrate/20241022104748_add_confirmation_settings.decidim_guest_meeting_registration.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_guest_meeting_registration (originally 20240820021908) + +class AddConfirmationSettings < ActiveRecord::Migration[6.0] + def change + add_column :decidim_guest_meeting_registration_settings, :enable_registration_confirmation, :boolean, default: false, after: :enable_guest_registration + end +end diff --git a/db/migrate/20241022104749_create_guest_meeting_registration_registration_requests.decidim_guest_meeting_registration.rb b/db/migrate/20241022104749_create_guest_meeting_registration_registration_requests.decidim_guest_meeting_registration.rb new file mode 100644 index 0000000..123745b --- /dev/null +++ b/db/migrate/20241022104749_create_guest_meeting_registration_registration_requests.decidim_guest_meeting_registration.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true +# This migration comes from decidim_guest_meeting_registration (originally 20240820021909) + +class CreateGuestMeetingRegistrationRegistrationRequests < ActiveRecord::Migration[6.0] + def change + create_table :decidim_guest_meeting_registration_registration_requests do |t| + t.references :decidim_organization, foreign_key: true, index: { name: :index_guest_meeting_registration_rr_on_organization_id } + t.references :decidim_meetings_meetings, foreign_key: true, index: { name: :index_guest_meeting_registration_mm_on_organization_id } + t.integer :decidim_user_id, index: { name: :index_guest_meeting_registration_uid_on_organization_id } + + t.jsonb :form_data + t.string :email, null: false + t.string :name + + t.timestamps + end + end +end diff --git a/db/migrate/20241022104750_add_confirmation_to_register_requests.decidim_guest_meeting_registration.rb b/db/migrate/20241022104750_add_confirmation_to_register_requests.decidim_guest_meeting_registration.rb new file mode 100644 index 0000000..bc31c86 --- /dev/null +++ b/db/migrate/20241022104750_add_confirmation_to_register_requests.decidim_guest_meeting_registration.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true +# This migration comes from decidim_guest_meeting_registration (originally 20240820021910) + +class AddConfirmationToRegisterRequests < ActiveRecord::Migration[6.0] + def change + add_column :decidim_guest_meeting_registration_registration_requests, :confirmation_token, :string, after: :name + add_column :decidim_guest_meeting_registration_registration_requests, :confirmed_at, :datetime, after: :confirmation_token + end +end diff --git a/db/migrate/20241022104751_add_cancellation_settings.decidim_guest_meeting_registration.rb b/db/migrate/20241022104751_add_cancellation_settings.decidim_guest_meeting_registration.rb new file mode 100644 index 0000000..50ee722 --- /dev/null +++ b/db/migrate/20241022104751_add_cancellation_settings.decidim_guest_meeting_registration.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_guest_meeting_registration (originally 20240820021911) + +class AddCancellationSettings < ActiveRecord::Migration[6.0] + def change + add_column :decidim_guest_meeting_registration_settings, :enable_cancellation, :boolean, default: false, after: :enable_guest_registration + end +end diff --git a/db/migrate/20241022104752_add_cancellation_to_register_requests.decidim_guest_meeting_registration.rb b/db/migrate/20241022104752_add_cancellation_to_register_requests.decidim_guest_meeting_registration.rb new file mode 100644 index 0000000..1585ebb --- /dev/null +++ b/db/migrate/20241022104752_add_cancellation_to_register_requests.decidim_guest_meeting_registration.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_guest_meeting_registration (originally 20240820021912) + +class AddCancellationToRegisterRequests < ActiveRecord::Migration[6.0] + def change + add_column :decidim_guest_meeting_registration_registration_requests, :cancellation_token, :string, after: :name + end +end diff --git a/db/migrate/20241022104753_add_session_token_to_register_requests.decidim_guest_meeting_registration.rb b/db/migrate/20241022104753_add_session_token_to_register_requests.decidim_guest_meeting_registration.rb new file mode 100644 index 0000000..06682fc --- /dev/null +++ b/db/migrate/20241022104753_add_session_token_to_register_requests.decidim_guest_meeting_registration.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_guest_meeting_registration (originally 20240820021913) + +class AddSessionTokenToRegisterRequests < ActiveRecord::Migration[6.0] + def change + add_column :decidim_guest_meeting_registration_registration_requests, :session_token, :string, after: :name, unique: true + end +end diff --git a/db/migrate/20241022104754_add_disable_normal_account_to_register_settings.decidim_guest_meeting_registration.rb b/db/migrate/20241022104754_add_disable_normal_account_to_register_settings.decidim_guest_meeting_registration.rb new file mode 100644 index 0000000..3ad60f3 --- /dev/null +++ b/db/migrate/20241022104754_add_disable_normal_account_to_register_settings.decidim_guest_meeting_registration.rb @@ -0,0 +1,8 @@ +# frozen_string_literal: true +# This migration comes from decidim_guest_meeting_registration (originally 20240820021914) + +class AddDisableNormalAccountToRegisterSettings < ActiveRecord::Migration[6.0] + def change + add_column :decidim_guest_meeting_registration_settings, :disable_account_confirmation, :boolean, default: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 61e721f..82755a5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,12 +10,15 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_06_25_091114) do +ActiveRecord::Schema.define(version: 2024_10_22_104754) do # These are extensions that must be enabled in order to support this database enable_extension "ltree" enable_extension "pg_trgm" enable_extension "plpgsql" + enable_extension "fuzzystrmatch" + enable_extension "postgis_tiger_geocoder" + enable_extension "postgis_topology" create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false @@ -858,6 +861,35 @@ t.index ["user_id"], name: "index_decidim_gamification_badge_scores_on_user_id" end + create_table "decidim_guest_meeting_registration_registration_requests", force: :cascade do |t| + t.bigint "decidim_organization_id" + t.bigint "decidim_meetings_meetings_id" + t.integer "decidim_user_id" + t.jsonb "form_data" + t.string "email", null: false + t.string "name" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.string "confirmation_token" + t.datetime "confirmed_at" + t.string "cancellation_token" + t.string "session_token" + t.index ["decidim_meetings_meetings_id"], name: "index_guest_meeting_registration_mm_on_organization_id" + t.index ["decidim_organization_id"], name: "index_guest_meeting_registration_rr_on_organization_id" + t.index ["decidim_user_id"], name: "index_guest_meeting_registration_uid_on_organization_id" + end + + create_table "decidim_guest_meeting_registration_settings", force: :cascade do |t| + t.boolean "enable_guest_registration", default: false + t.bigint "decidim_organization_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.boolean "enable_registration_confirmation", default: false + t.boolean "enable_cancellation", default: false + t.boolean "disable_account_confirmation", default: false + t.index ["decidim_organization_id"], name: "index_guest_meeting_registration_settings_on_organization_id" + end + create_table "decidim_hashtags", force: :cascade do |t| t.bigint "decidim_organization_id" t.string "name" @@ -2295,6 +2327,9 @@ add_foreign_key "decidim_debates_debates", "decidim_scopes" add_foreign_key "decidim_editor_images", "decidim_organizations" add_foreign_key "decidim_editor_images", "decidim_users", column: "decidim_author_id" + add_foreign_key "decidim_guest_meeting_registration_registration_requests", "decidim_meetings_meetings", column: "decidim_meetings_meetings_id" + add_foreign_key "decidim_guest_meeting_registration_registration_requests", "decidim_organizations" + add_foreign_key "decidim_guest_meeting_registration_settings", "decidim_organizations" add_foreign_key "decidim_identities", "decidim_organizations" add_foreign_key "decidim_initiatives_settings", "decidim_organizations" add_foreign_key "decidim_navigation_maps_blueprint_areas", "decidim_navigation_maps_blueprints" From ac7ebe4bb8624fca3baf579e4a1ad89103ebe338 Mon Sep 17 00:00:00 2001 From: Robin Steiner Date: Tue, 22 Oct 2024 16:37:48 +0200 Subject: [PATCH 2/2] Remove postgis --- db/schema.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 82755a5..6645e7c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -17,8 +17,6 @@ enable_extension "pg_trgm" enable_extension "plpgsql" enable_extension "fuzzystrmatch" - enable_extension "postgis_tiger_geocoder" - enable_extension "postgis_topology" create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false