diff --git a/db/migrate/20240510040639_remove_distributor_info_from_enterprises.rb b/db/migrate/20240510040639_remove_distributor_info_from_enterprises.rb new file mode 100644 index 0000000000..3ead73c8a7 --- /dev/null +++ b/db/migrate/20240510040639_remove_distributor_info_from_enterprises.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class RemoveDistributorInfoFromEnterprises < ActiveRecord::Migration[7.0] + def change + remove_column :enterprises, :distributor_info, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 1cbb2938fa..11699763ba 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[7.0].define(version: 2024_05_01_075735) do +ActiveRecord::Schema[7.0].define(version: 2024_05_10_040639) do # These are extensions that must be enabled in order to support this database enable_extension "pg_stat_statements" enable_extension "plpgsql" @@ -208,7 +208,6 @@ ActiveRecord::Schema[7.0].define(version: 2024_05_01_075735) do t.string "next_collection_at", limit: 255 t.datetime "created_at", precision: nil, null: false t.datetime "updated_at", precision: nil, null: false - t.text "distributor_info" t.string "facebook", limit: 255 t.string "instagram", limit: 255 t.string "linkedin", limit: 255 diff --git a/lib/tasks/enterprises.rake b/lib/tasks/enterprises.rake index bc97529547..7c2696448c 100644 --- a/lib/tasks/enterprises.rake +++ b/lib/tasks/enterprises.rake @@ -32,7 +32,7 @@ namespace :ofn do def enterprise_header ['name', 'description', 'long_description', 'is_primary_producer', 'is_distributor', 'contact_name', 'phone', 'email', 'website', 'twitter', 'abn', 'acn', 'pickup_times', - 'next_collection_at', 'distributor_info', 'visible', 'facebook', 'instagram', 'linkedin', + 'next_collection_at', 'visible', 'facebook', 'instagram', 'linkedin', 'address1', 'address2', 'city', 'zipcode', 'state', 'country'] end @@ -41,7 +41,7 @@ namespace :ofn do enterprise.is_primary_producer, enterprise.is_distributor, enterprise.contact_name, enterprise.phone, enterprise.email, enterprise.website, enterprise.twitter, enterprise.abn, enterprise.acn, enterprise.pickup_times, enterprise.next_collection_at, - enterprise.distributor_info, enterprise.visible, enterprise.facebook, enterprise.instagram, + enterprise.visible, enterprise.facebook, enterprise.instagram, enterprise.linkedin, enterprise.address.address1, enterprise.address.address2, enterprise.address.city, enterprise.address.zipcode, enterprise.address.state_name, enterprise.address.country&.name]