Skip to content

Useful Stuff

Toby Hede edited this page Jan 21, 2015 · 2 revisions

Index Colour Variants

Products::ColorVariantsIndexer.index!

Blast product images from the production database

UPDATE spree_assets SET attachment_file_name=NULL, attachment_content_type=NULL, attachment_file_size=NULL, attachment_updated_at=NULL;

Find when coupons where used and their order number

SELECT spree_orders.number, spree_orders.completed_at, spree_adjustments.created_at FROM spree_adjustments 
JOIN spree_orders ON spree_adjustments.source_id = spree_orders.id
WHERE originator_type = 'Spree::PromotionAction'
AND label ILIKE '%bride%'
-- AND spree_orders.completed_at IS NOT NULL