-- Migration: Add login_history table
-- Date: 2026-01-19
-- VIOLATION: Missing DOWN section for rollback

-- UP
CREATE TABLE login_history (
    id SERIAL PRIMARY KEY,
    user_id INTEGER REFERENCES users(id),
    ip_address VARCHAR(45),
    user_agent TEXT,
    logged_in_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX idx_login_history_user_id ON login_history(user_id);

-- VIOLATION: No DOWN section!
