Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔐 Marketplace: Step 3 of encrypting delivery_address #1176

Merged
merged 1 commit into from
Mar 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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