Sha256: 612ceea0045e8828388d3f6e332b9e4226005495d638e88dd4b2a00a5119ff5c

Contents?: true

Size: 498 Bytes

Versions: 75

Compression:

Stored size: 498 Bytes

Contents

begin
  required_column_names = ["owner_id", "owner_type", "name"]     
  if (Spree::Preference.column_names & required_column_names) == required_column_names
     ActiveRecord::Base.connection.execute("SELECT owner_id, owner_type, name, value FROM spree_preferences WHERE 'key' IS NULL").each do |pref|
       warn "[WARNING] Orphaned preference `#{pref[2]}` with value `#{pref[3]}` for #{pref[1]} with id of: #{pref[0]}, you should reset the preference value manually."
     end
  end
rescue
end

Version data entries

75 entries across 75 versions & 3 rubygems

Version Path
spree_frontend-2.4.10 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.3.13 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.2.14 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.4.9 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.3.12 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.2.13 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.4.8 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.3.11 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.2.12 config/initializers/check_for_orphaned_preferences.rb
solidus_frontend-1.0.0.pre config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.4.7 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.3.10 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.4.6 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.3.9 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.2.11 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.2.10 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.3.8 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.4.5 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.4.4 config/initializers/check_for_orphaned_preferences.rb
spree_frontend-2.3.7 config/initializers/check_for_orphaned_preferences.rb