-- Add contact and map fields to settings table
-- These fields enable location display and contact information on the website

ALTER TABLE settings 
ADD COLUMN IF NOT EXISTS contact_address VARCHAR(255),
ADD COLUMN IF NOT EXISTS contact_city VARCHAR(100),
ADD COLUMN IF NOT EXISTS contact_zip VARCHAR(20),
ADD COLUMN IF NOT EXISTS contact_country VARCHAR(100),
ADD COLUMN IF NOT EXISTS contact_phone VARCHAR(50),
ADD COLUMN IF NOT EXISTS contact_email VARCHAR(255),
ADD COLUMN IF NOT EXISTS location_latitude DOUBLE PRECISION,
ADD COLUMN IF NOT EXISTS location_longitude DOUBLE PRECISION,
ADD COLUMN IF NOT EXISTS map_zoom_level INT DEFAULT 15,
ADD COLUMN IF NOT EXISTS map_style VARCHAR(50),
ADD COLUMN IF NOT EXISTS show_map_on_homepage BOOLEAN DEFAULT FALSE;

-- Add comments for documentation
COMMENT ON COLUMN settings.contact_address IS 'Street address of the club/stadium';
COMMENT ON COLUMN settings.contact_city IS 'City name';
COMMENT ON COLUMN settings.contact_zip IS 'Postal/ZIP code';
COMMENT ON COLUMN settings.contact_country IS 'Country name';
COMMENT ON COLUMN settings.contact_phone IS 'Contact phone number';
COMMENT ON COLUMN settings.contact_email IS 'Contact email address';
COMMENT ON COLUMN settings.location_latitude IS 'Geographic latitude for map display';
COMMENT ON COLUMN settings.location_longitude IS 'Geographic longitude for map display';
COMMENT ON COLUMN settings.map_zoom_level IS 'Default zoom level for map (1-20)';
COMMENT ON COLUMN settings.map_style IS 'Map style: default, dark, or satellite';
COMMENT ON COLUMN settings.show_map_on_homepage IS 'Whether to display map on homepage';
