-- Reset all sales data while keeping products and events
-- This script deletes orders, chits, and order_tickets

-- First, delete chits (menu item purchases)
DELETE FROM chits;

-- Delete order_tickets (ticket purchases)
DELETE FROM order_tickets;

-- Delete all orders
DELETE FROM orders;

-- Reset quantity_sold on all event tickets back to 0
UPDATE event_tickets SET quantity_sold = 0;

-- Verify the reset
SELECT 'orders' as table_name, COUNT(*) as count FROM orders
UNION ALL
SELECT 'chits', COUNT(*) FROM chits
UNION ALL
SELECT 'order_tickets', COUNT(*) FROM order_tickets;
