From e81d213bee3d3ea89d1fd3734956d6a8588c543f Mon Sep 17 00:00:00 2001 From: Martin Meyerhoff Date: Wed, 13 Apr 2022 12:00:16 +0200 Subject: [PATCH] Remove deprecated_address_id column from shipments We have not used this column since we removed all references to it in 2016. --- ...95534_drop_deprecated_address_id_from_shipments.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 core/db/migrate/20220413095534_drop_deprecated_address_id_from_shipments.rb diff --git a/core/db/migrate/20220413095534_drop_deprecated_address_id_from_shipments.rb b/core/db/migrate/20220413095534_drop_deprecated_address_id_from_shipments.rb new file mode 100644 index 00000000000..db3e42e7d89 --- /dev/null +++ b/core/db/migrate/20220413095534_drop_deprecated_address_id_from_shipments.rb @@ -0,0 +1,11 @@ +class DropDeprecatedAddressIdFromShipments < ActiveRecord::Migration[5.2] + def up + remove_index :spree_shipments, column: [:deprecated_address_id], name: :index_spree_shipments_on_deprecated_address_id + remove_column :spree_shipments, :deprecated_address_id + end + + def down + add_column :spree_shipments, :deprecated_address_id + add_index :spree_shipments, :deprecated_address_id, name: :index_spree_shipments_on_deprecated_address_id + end +end