Skip to content

Commit

Permalink
🔐 Marketplace: Step 3 of encrypting delivery_address
Browse files Browse the repository at this point in the history
- #831
- #1136

Merge immediately after #1175
  • Loading branch information
zspencer committed Mar 3, 2023
1 parent 68479ca commit 4cf525f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/furniture/marketplace/cart.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion app/furniture/marketplace/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class DropMarketplaceOrdersDeliveryAddress < ActiveRecord::Migration[7.0]
def change
remove_column :marketplace_orders, :delivery_address, :string
end
end
3 changes: 1 addition & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 4cf525f

Please sign in to comment.