From 7ab8c1f327799e9e5d5ece59800a12711027a849 Mon Sep 17 00:00:00 2001 From: Thomas Burkhalter Date: Wed, 27 Mar 2024 22:59:03 +0100 Subject: [PATCH] Remove remaining elements of the homepage interactive map module --- ...7215408_revert_homepage_interactive_map.rb | 11 ++++ db/schema.rb | 54 ++++++++++++++++--- 2 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 db/migrate/20240327215408_revert_homepage_interactive_map.rb diff --git a/db/migrate/20240327215408_revert_homepage_interactive_map.rb b/db/migrate/20240327215408_revert_homepage_interactive_map.rb new file mode 100644 index 00000000..d132bdb5 --- /dev/null +++ b/db/migrate/20240327215408_revert_homepage_interactive_map.rb @@ -0,0 +1,11 @@ +class RevertHomepageInteractiveMap < ActiveRecord::Migration[6.1] + require_relative '20210429220804_add_geo_json_to_scopes.decidim_homepage_interactive_map.rb' + require_relative '20210429220805_add_geolocation_to_participatory_processes.decidim_homepage_interactive_map.rb' + require_relative '20210429220806_add_display_linked_assemblies_to_participatory_processes.decidim_homepage_interactive_map.rb' + + def change + revert AddDisplayLinkedAssembliesToParticipatoryProcesses + revert AddGeolocationToParticipatoryProcesses + revert AddGeoJsonToScopes + end +end diff --git a/db/schema.rb b/db/schema.rb index 201dbf96..ffb1e29c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,12 +10,13 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_02_02_224501) do +ActiveRecord::Schema.define(version: 2024_03_27_215408) 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 "postgis" create_table "active_storage_attachments", force: :cascade do |t| t.string "name", null: false @@ -806,6 +807,40 @@ t.index ["user_id"], name: "index_decidim_gamification_badge_scores_on_user_id" end + create_table "decidim_geo_configs", force: :cascade do |t| + t.float "longitude" + t.float "latitude" + t.integer "zoom" + t.string "tile" + t.boolean "only_processes", default: false, null: false + t.boolean "only_assemblies", default: false, null: false + end + +# Could not dump table "decidim_geo_shapefile_datas" because of following StandardError +# Unknown type 'geometry(MultiPolygon)' for column 'geom' + + create_table "decidim_geo_shapefiles", force: :cascade do |t| + t.string "title", null: false + t.string "description" + t.bigint "decidim_scope_types_id" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.bigint "decidim_organization_id" + t.index ["decidim_organization_id"], name: "index_decidim_geo_shapefiles_on_decidim_organization_id" + t.index ["decidim_scope_types_id"], name: "index_decidim_geo_shapefiles_on_decidim_scope_types_id" + end + + create_table "decidim_geo_space_locations", force: :cascade do |t| + t.bigint "decidim_geo_space_id" + t.string "decidim_geo_space_type" + t.string "address" + t.float "latitude" + t.float "longitude" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["decidim_geo_space_type", "decidim_geo_space_id"], name: "decidim_geo_space_poly_idx", unique: true + end + create_table "decidim_hashtags", force: :cascade do |t| t.bigint "decidim_organization_id" t.string "name" @@ -1380,10 +1415,6 @@ t.boolean "show_metrics", default: true t.integer "weight", default: 1, null: false t.integer "follows_count", default: 0, null: false - t.string "address" - t.float "latitude" - t.float "longitude" - t.boolean "display_linked_assemblies", default: false t.bigint "decidim_participatory_process_type_id" 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 @@ -1608,7 +1639,6 @@ t.integer "parent_id" t.string "code", null: false t.integer "part_of", default: [], null: false, array: true - t.jsonb "geojson" t.index ["decidim_organization_id", "code"], name: "index_decidim_scopes_on_decidim_organization_id_and_code", unique: true t.index ["decidim_organization_id"], name: "index_decidim_scopes_on_decidim_organization_id" t.index ["parent_id"], name: "index_decidim_scopes_on_parent_id" @@ -2003,6 +2033,14 @@ t.index ["redirect_rule_id"], name: "index_request_environment_rules_on_redirect_rule_id" end + create_table "spatial_ref_sys", primary_key: "srid", id: :integer, default: nil, force: :cascade do |t| + t.string "auth_name", limit: 256 + t.integer "auth_srid" + t.string "srtext", limit: 2048 + t.string "proj4text", limit: 2048 + t.check_constraint "(srid > 0) AND (srid <= 998999)", name: "spatial_ref_sys_srid_check" + end + create_table "versions", force: :cascade do |t| t.string "item_type", null: false t.integer "item_id", null: false @@ -2034,6 +2072,10 @@ 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_geo_shapefile_datas", "decidim_geo_shapefiles", column: "decidim_geo_shapefiles_id" + add_foreign_key "decidim_geo_shapefile_datas", "decidim_scopes", column: "decidim_scopes_id" + add_foreign_key "decidim_geo_shapefiles", "decidim_organizations" + add_foreign_key "decidim_geo_shapefiles", "decidim_scope_types", column: "decidim_scope_types_id" add_foreign_key "decidim_identities", "decidim_organizations" add_foreign_key "decidim_navigation_maps_blueprint_areas", "decidim_navigation_maps_blueprints" add_foreign_key "decidim_navigation_maps_blueprints", "decidim_content_blocks"