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.

Fix jsonb check in AddMissingFieldsToUsers migration

Damian Legawiecb3caa2b7aaee
diff --git a/core/db/migrate/20250605131334_add_missing_fields_to_users.rb b/core/db/migrate/20250605131334_add_missing_fields_to_users.rb
index 23dccf472d..a2c2f822f0 100644
--- a/core/db/migrate/20250605131334_add_missing_fields_to_users.rb
+++ b/core/db/migrate/20250605131334_add_missing_fields_to_users.rb
@@ -5,7 +5,7 @@ class AddMissingFieldsToUsers < ActiveRecord::Migration[7.2]
users_table = Spree.user_class.table_name
add_column users_table, :login, :string, if_not_exists: true
- json_type = if respond_to?(:jsonb)
+ json_type = if users_table.respond_to?(:jsonb)
:jsonb
else
:json