-- remove user reference from orders
ALTER TABLE orders
    DROP COLUMN IF EXISTS user_id;

-- remove agent columns from validations
ALTER TABLE validations
    DROP COLUMN IF EXISTS agent_risk_notice;

ALTER TABLE validations
    DROP COLUMN IF EXISTS agent_delivery_advice;

ALTER TABLE validations
    DROP COLUMN IF EXISTS agent_continue_trade_advice;

ALTER TABLE validations
    DROP COLUMN IF EXISTS agent_validation_explanation;

-- remove agent columns from pricing_results
ALTER TABLE pricing_results
    DROP COLUMN IF EXISTS agent_next_action;

ALTER TABLE pricing_results
    DROP COLUMN IF EXISTS agent_budget_advice;

ALTER TABLE pricing_results
    DROP COLUMN IF EXISTS agent_risk_advice;

ALTER TABLE pricing_results
    DROP COLUMN IF EXISTS agent_task_match_explanation;

-- remove user reference from buyer_requests
ALTER TABLE buyer_requests
    DROP COLUMN IF EXISTS user_id;

-- remove agent columns from data_assets
ALTER TABLE data_assets
    DROP COLUMN IF EXISTS agent_asset_explanation;

ALTER TABLE data_assets
    DROP COLUMN IF EXISTS agent_risk_per_mission_advice;

ALTER TABLE data_assets
    DROP COLUMN IF EXISTS agent_recommended_tasks;

ALTER TABLE data_assets
    DROP COLUMN IF EXISTS agent_asset_summary;

-- remove user reference from data_assets
ALTER TABLE data_assets
    DROP COLUMN IF EXISTS user_id;

-- drop users table
DROP TABLE IF EXISTS users;