From 4cf525f95810c9615ba435c866513a0fb566efd9 Mon Sep 17 00:00:00 2001 From: Zee Spencer <50284+zspencer@users.noreply.github.com> Date: Fri, 3 Mar 2023 12:20:50 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=90=20`Marketplace`:=20Step=203=20of?= =?UTF-8?q?=20encrypting=20`delivery=5Faddress`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - https://github.com/zinc-collective/convene/issues/831 - https://github.com/zinc-collective/convene/issues/1136 Merge immediately after https://github.com/zinc-collective/convene/pull/1175 --- app/furniture/marketplace/cart.rb | 1 - app/furniture/marketplace/order.rb | 1 - ...0230303201956_drop_marketplace_orders_delivery_address.rb | 5 +++++ db/schema.rb | 3 +-- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20230303201956_drop_marketplace_orders_delivery_address.rb diff --git a/app/furniture/marketplace/cart.rb b/app/furniture/marketplace/cart.rb index c75b0e881..2ef36b9c9 100644 --- a/app/furniture/marketplace/cart.rb +++ b/app/furniture/marketplace/cart.rb @@ -16,7 +16,6 @@ class Cart < Record has_many :products, through: :cart_products, inverse_of: :carts has_encrypted :delivery_address - self.ignored_columns += ["delivery_address"] enum status: { pre_checkout: "pre_checkout", diff --git a/app/furniture/marketplace/order.rb b/app/furniture/marketplace/order.rb index 8757d77c8..c1ef11048 100644 --- a/app/furniture/marketplace/order.rb +++ b/app/furniture/marketplace/order.rb @@ -12,7 +12,6 @@ class Order < Record has_many :products, through: :ordered_products, inverse_of: :orders has_encrypted :delivery_address - self.ignored_columns += ["delivery_address"] enum status: { pre_checkout: "pre_checkout", diff --git a/db/migrate/20230303201956_drop_marketplace_orders_delivery_address.rb b/db/migrate/20230303201956_drop_marketplace_orders_delivery_address.rb new file mode 100644 index 000000000..0efbaa498 --- /dev/null +++ b/db/migrate/20230303201956_drop_marketplace_orders_delivery_address.rb @@ -0,0 +1,5 @@ +class DropMarketplaceOrdersDeliveryAddress < ActiveRecord::Migration[7.0] + def change + remove_column :marketplace_orders, :delivery_address, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 6f0ba1687..7737542db 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: 2023_03_02_202459) do +ActiveRecord::Schema[7.0].define(version: 2023_03_03_201956) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" enable_extension "plpgsql" @@ -134,7 +134,6 @@ t.uuid "shopper_id" t.string "status", default: "pre_checkout", null: false t.string "stripe_session_id" - t.string "delivery_address" t.string "contact_email" t.text "delivery_address_ciphertext" t.index ["marketplace_id"], name: "index_marketplace_orders_on_marketplace_id"