diff --git a/db.go b/db.go index 611afd0..b3a2993 100644 --- a/db.go +++ b/db.go @@ -225,6 +225,8 @@ func OpenDatabase(connString string) (*DB, error) { } // Add token_expiry column if missing (used by OAuth library) pool.Exec(ctx, "ALTER TABLE oauth_sessions ADD COLUMN IF NOT EXISTS token_expiry TIMESTAMP") + // Make access_token nullable (session created before tokens obtained) + pool.Exec(ctx, "ALTER TABLE oauth_sessions ALTER COLUMN access_token DROP NOT NULL") // Migration: rename feed columns for consistent terminology // last_crawled_at -> last_checked_at (feed_check = checking feeds for new items)