Make oauth_sessions.access_token nullable
Session is created before tokens are obtained during OAuth flow. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -225,6 +225,8 @@ func OpenDatabase(connString string) (*DB, error) {
|
|||||||
}
|
}
|
||||||
// Add token_expiry column if missing (used by OAuth library)
|
// 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")
|
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
|
// Migration: rename feed columns for consistent terminology
|
||||||
// last_crawled_at -> last_checked_at (feed_check = checking feeds for new items)
|
// last_crawled_at -> last_checked_at (feed_check = checking feeds for new items)
|
||||||
|
|||||||
Reference in New Issue
Block a user