-- +migrate Down
-- Migration: Enhance match entity with negotiation history and contract details
-- Description: Remove negotiation_history table and new match columns

-- Drop negotiation_history table
DROP TABLE IF EXISTS negotiation_history;

-- Remove new columns from matches table
ALTER TABLE matches DROP COLUMN IF EXISTS contract_contract_id;
ALTER TABLE matches DROP COLUMN IF EXISTS contract_signed_at;
ALTER TABLE matches DROP COLUMN IF EXISTS contract_effective_from;
ALTER TABLE matches DROP COLUMN IF EXISTS contract_termination_date;
ALTER TABLE matches DROP COLUMN IF EXISTS contract_value_per_year;
ALTER TABLE matches DROP COLUMN IF EXISTS contract_terms_url;
ALTER TABLE matches DROP COLUMN IF EXISTS contract_payment_terms;
ALTER TABLE matches DROP COLUMN IF EXISTS contract_termination_terms;
ALTER TABLE matches DROP COLUMN IF EXISTS contract_signatures;
ALTER TABLE matches DROP COLUMN IF EXISTS cancelled_by;
ALTER TABLE matches DROP COLUMN IF EXISTS cancelled_at;
