fix: auth fails when client IP is empty on Postgres (#695)

This commit is contained in:
Alessandro (Ale) Segala
2025-06-30 05:04:30 -07:00
committed by GitHub
parent dbf3da41f3
commit 031181ad2a
10 changed files with 122 additions and 51 deletions

View File

@@ -0,0 +1,4 @@
ALTER TABLE audit_logs ALTER COLUMN ip_address SET NOT NULL;
DROP INDEX IF EXISTS idx_audit_logs_created_at;
DROP INDEX IF EXISTS idx_audit_logs_user_agent;

View File

@@ -0,0 +1,5 @@
ALTER TABLE audit_logs ALTER COLUMN ip_address DROP NOT NULL;
-- Add missing indexes
CREATE INDEX idx_audit_logs_created_at ON audit_logs(created_at);
CREATE INDEX idx_audit_logs_user_agent ON audit_logs(user_agent);