From d6b904c211d58163782876959d54d28352495d95 Mon Sep 17 00:00:00 2001 From: Thigazhezhilan J Date: Sat, 2 May 2026 12:47:49 +0530 Subject: [PATCH] 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 --- db_migrations/20260502_auto_login.sql | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 db_migrations/20260502_auto_login.sql diff --git a/db_migrations/20260502_auto_login.sql b/db_migrations/20260502_auto_login.sql new file mode 100644 index 0000000..3da5543 --- /dev/null +++ b/db_migrations/20260502_auto_login.sql @@ -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;