- Add database migration for ip_address and browser_info columns - Install ua-parser-js for browser detection - Add IP extraction helper function - Update POST /api/dokumentasi to capture client IP and browser - Update GET endpoints to return tracking data - Display IP and browser info in documentation detail view - Update server port to 3002 Features: - Automatic IP address capture from request headers - Browser and OS detection with version info - Display in detail modal for each documentation
13 lines
371 B
SQL
13 lines
371 B
SQL
-- Migration: Add IP Address and Browser Tracking
|
|
-- Date: 2026-01-19
|
|
|
|
USE dokumentasi;
|
|
|
|
-- Add new columns to dokumentasi table
|
|
ALTER TABLE dokumentasi
|
|
ADD COLUMN ip_address VARCHAR(45) AFTER timestamp,
|
|
ADD COLUMN browser_info VARCHAR(500) AFTER ip_address;
|
|
|
|
-- Add index for IP address queries (optional)
|
|
ALTER TABLE dokumentasi ADD INDEX idx_ip_address (ip_address);
|