Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Add store_id column to any pre-existing spree_wishlists table.

Matthew Kennedye5b5d329b66a
diff --git a/core/db/migrate/20210902110754_rename_column_access_hash_to_token.rb b/core/db/migrate/20210902110754_rename_column_access_hash_to_token.rb
index ab83e9732c..a678e7afec 100644
--- a/core/db/migrate/20210902110754_rename_column_access_hash_to_token.rb
+++ b/core/db/migrate/20210902110754_rename_column_access_hash_to_token.rb
@@ -2,6 +2,7 @@ class RenameColumnAccessHashToToken < ActiveRecord::Migration[5.2]
def change
if table_exists?(:spree_wishlists)
rename_column(:spree_wishlists, :access_hash, :token) if column_exists?(:spree_wishlists, :access_hash)
+ add_reference(:spree_wishlists, :store, index: true) unless column_exists?(:spree_wishlists, :store_id)
end
end
end