CREATE TABLE IF NOT EXISTS project_access_log (
    id BIGSERIAL PRIMARY KEY,
    project UUID NOT NULL,
    actor_uid UUID,
    action VARCHAR(255) NOT NULL,
    ip_address VARCHAR(255),
    user_agent VARCHAR(255),
    created_at TIMESTAMPTZ NOT NULL
);

CREATE INDEX idx_project_access_log_project ON project_access_log (project);
CREATE INDEX idx_project_access_log_created_at ON project_access_log (created_at);
