-- Post-import checks for cPanel / phpMyAdmin.

SELECT table_name
FROM information_schema.tables
WHERE table_schema = DATABASE()
  AND table_name IN (
    'users',
    'clients',
    'machinery',
    'work_orders',
    'work_order_details',
    'work_order_operators',
    'work_order_machinery',
    'order_history',
    'blueprints'
  )
ORDER BY table_name;

SELECT COUNT(*) AS total_users FROM users;
SELECT COUNT(*) AS total_clients FROM clients;
SELECT COUNT(*) AS total_machinery FROM machinery;
SELECT COUNT(*) AS total_work_orders FROM work_orders;
SELECT COUNT(*) AS total_work_order_details FROM work_order_details;
SELECT COUNT(*) AS total_blueprints FROM blueprints;

SELECT id, username, email, role, is_active
FROM users
ORDER BY id;

SELECT id, order_number, status, priority, client_id, created_by
FROM work_orders
ORDER BY id;
