Add auto-login columns to user_broker table

Adds zerodha_login_id, zerodha_password (encrypted), totp_secret
(encrypted), auto_login_enabled flag, and last refresh tracking
columns to support automated daily Zerodha session refresh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thigazhezhilan J 2026-05-02 12:47:49 +05:30
parent cd99fd1962
commit d6b904c211

View File

@ -0,0 +1,8 @@
-- Auto-login credentials for daily Zerodha token refresh
ALTER TABLE user_broker
ADD COLUMN IF NOT EXISTS zerodha_login_id TEXT,
ADD COLUMN IF NOT EXISTS zerodha_password TEXT,
ADD COLUMN IF NOT EXISTS totp_secret TEXT,
ADD COLUMN IF NOT EXISTS auto_login_enabled BOOLEAN NOT NULL DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS auto_login_last_at TIMESTAMPTZ,
ADD COLUMN IF NOT EXISTS auto_login_last_err TEXT;