-- Add latitude and longitude columns to restaurants table
-- These columns will store geographic coordinates for each restaurant

-- Add new columns for geographic coordinates
ALTER TABLE restaurants 
ADD COLUMN latitude DECIMAL(10, 8),
ADD COLUMN longitude DECIMAL(11, 8);

-- Add indexes for better query performance (useful for location-based searches)
CREATE INDEX idx_restaurants_coordinates ON restaurants(latitude, longitude);
CREATE INDEX idx_restaurants_latitude ON restaurants(latitude);
CREATE INDEX idx_restaurants_longitude ON restaurants(longitude);

-- Add comments for documentation
COMMENT ON COLUMN restaurants.latitude IS 'Latitude coordinate of the restaurant location (decimal degrees)';
COMMENT ON COLUMN restaurants.longitude IS 'Longitude coordinate of the restaurant location (decimal degrees)';

-- Note: DECIMAL(10, 8) for latitude allows values from -90.00000000 to 90.00000000
-- Note: DECIMAL(11, 8) for longitude allows values from -180.00000000 to 180.00000000