diff --git a/app/controllers/events_controller.rb b/app/controllers/events_controller.rb index 8b6c0faa..c6e28e2a 100644 --- a/app/controllers/events_controller.rb +++ b/app/controllers/events_controller.rb @@ -83,6 +83,6 @@ class EventsController < ApplicationController private def event_params - params.require(:event).permit(:deleted, :name, :tagline, :summary, :body, :end_datetime, :start_datetime, :latitude, :longitude, :location, :city, :state_code, :address, :zip_code, :main_image, :remove_main_image, :background_image, :remove_background_image, :published, :slug, :directions, :venue_name, :profile_id, :ticket_levels_attributes, :show_total_raised, :show_total_count, :hide_activity_feed, :nonprofit_id, :hide_title, :organizer_email, :receipt_message) + params.require(:event).permit(:deleted, :name, :tagline, :summary, :body, :end_datetime, :start_datetime, :location, :city, :state_code, :address, :zip_code, :main_image, :remove_main_image, :background_image, :remove_background_image, :published, :slug, :directions, :venue_name, :profile_id, :ticket_levels_attributes, :show_total_raised, :show_total_count, :hide_activity_feed, :nonprofit_id, :hide_title, :organizer_email, :receipt_message) end end diff --git a/app/controllers/nonprofits_controller.rb b/app/controllers/nonprofits_controller.rb index 9918b8bf..09d42ed9 100755 --- a/app/controllers/nonprofits_controller.rb +++ b/app/controllers/nonprofits_controller.rb @@ -170,8 +170,6 @@ class NonprofitsController < ApplicationController :published, :vetted, :verification_status, - :latitude, - :longitude, :timezone, :address, :thank_you_note, diff --git a/app/models/event.rb b/app/models/event.rb index 78dbfaec..ae1c50ef 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -13,8 +13,6 @@ class Event < ApplicationRecord # :body, # text (html) # :end_datetime, # :start_datetime, - # :latitude, # float - # :longitude, # float # :location, # str # :city, # str # :state_code, # str diff --git a/app/models/supporter.rb b/app/models/supporter.rb index 371df250..3881dcbd 100644 --- a/app/models/supporter.rb +++ b/app/models/supporter.rb @@ -19,9 +19,7 @@ class Supporter < ApplicationRecord # :country, # :phone, # :organization, - # :latitude, # :locale, - # :longitude, # :zip_code, # :total_raised, # :notes, diff --git a/app/models/user.rb b/app/models/user.rb index dc5ab0de..30ddcef5 100755 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -17,8 +17,6 @@ class User < ApplicationRecord # :name, # str: created with oauth # :auto_generated, # bool: flag whether a password was auto-generated for this account # :referer, # str: ID of the user who referred this account - # :latitude, - # :longitude, # :reset_password_token, # :reset_password_sent_at, # :picture, # str: url for fb or twitter pic diff --git a/app/views/app_data/_nonprofit.jbuilder b/app/views/app_data/_nonprofit.jbuilder index 389ddd13..adde90b4 100644 --- a/app/views/app_data/_nonprofit.jbuilder +++ b/app/views/app_data/_nonprofit.jbuilder @@ -4,7 +4,7 @@ # Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE json.extract! nonprofit, :id, :name, #basics :brand_color, :brand_font, :tagline, #brand - :zip_code, :state_code, :city, :latitude, :longitude, #location + :zip_code, :state_code, :city, :slug, :state_code_slug, :city_slug, #slugs :no_anon #options json.url nonprofit_path(nonprofit) diff --git a/db/structure.sql b/db/structure.sql index 018cf4b7..ef0eb08f 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1003,8 +1003,6 @@ CREATE TABLE public.events ( tagline character varying(255), summary text, body text, - latitude double precision, - longitude double precision, location character varying(255), main_image character varying(255), background_image character varying(255), @@ -1500,8 +1498,6 @@ CREATE TABLE public.nonprofits ( address text, vetted boolean, zip_code character varying(255), - latitude double precision, - longitude double precision, pending_balance integer, state_code_slug character varying(255), city_slug character varying(255), @@ -2058,8 +2054,6 @@ CREATE TABLE public.supporters ( state_code character varying(255), anonymous boolean DEFAULT false NOT NULL, zip_code character varying(255), - latitude double precision, - longitude double precision, full_contact_info_id integer, deleted boolean DEFAULT false, organization character varying(255), @@ -2400,8 +2394,6 @@ CREATE TABLE public.users ( city character varying(255), state_code character varying(255), location character varying(255), - latitude double precision, - longitude double precision, confirmation_token character varying(255), confirmed_at timestamp without time zone, confirmation_sent_at timestamp without time zone, diff --git a/gems/houdini_upgrade/db/migrate/20210204013426_remove_long_and_lat.rb b/gems/houdini_upgrade/db/migrate/20210204013426_remove_long_and_lat.rb new file mode 100644 index 00000000..8979c922 --- /dev/null +++ b/gems/houdini_upgrade/db/migrate/20210204013426_remove_long_and_lat.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later +# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE +class RemoveLongAndLat < ActiveRecord::Migration[6.1] + def change + [:users, :events, :nonprofits, :supporters].each do |i| + remove_column i, :longitude, "double precision" + remove_column i, :latitude, "double precision" + end + end +end diff --git a/spec/lib/insert/insert_duplicate_spec.rb b/spec/lib/insert/insert_duplicate_spec.rb index c6cb4592..407d10e6 100644 --- a/spec/lib/insert/insert_duplicate_spec.rb +++ b/spec/lib/insert/insert_duplicate_spec.rb @@ -217,9 +217,7 @@ describe InsertDuplicate do address: '100 N Appleton St', city: 'Appleton', directions: nil, - latitude: nil, location: nil, - longitude: nil, organizer_email: nil, state_code: 'WI', venue_name: nil,