-- Migration: Add camera field to gates table
-- Description: Tambah field camera untuk menyimpan URL atau identifier kamera di setiap gate
-- Supports: HLS (.m3u8), RTSP, HTTP streaming, camera ID, dll
-- Date: 2025-01-17

-- Add camera column to gates table
ALTER TABLE gates 
ADD COLUMN camera VARCHAR(500) NULL 
COMMENT 'URL streaming kamera (HLS .m3u8, RTSP, HTTP) atau identifier kamera untuk gate ini' 
AFTER direction;

-- Add index untuk performa query jika perlu filter by camera
-- (optional, uncomment jika diperlukan)
-- CREATE INDEX idx_camera ON gates(camera);

