66dc53f12f
PR Checks / test-and-build (pull_request) Successful in 6m6s
- Add V019 migration: rename session_audit_log.actor_telegram_id → actor_external_user_id - Add CSRF protection to Discord OAuth flow (state cookie with HttpOnly/Secure/Strict) - Add Discord OAuth env vars to compose.yaml, deploy.yml, and .env.example - Fix SQL COALESCE for nullable telegram_id in GetGroupManagersAsync and GetSessionParticipantsAsync Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
19 lines
684 B
SQL
19 lines
684 B
SQL
-- =============================================================
|
|
-- V019: Rename session_audit_log.actor_telegram_id to actor_external_user_id
|
|
-- =============================================================
|
|
-- Scope: Support platform-agnostic audit log identity.
|
|
-- =============================================================
|
|
|
|
ALTER TABLE session_audit_log
|
|
ADD COLUMN actor_external_user_id VARCHAR(255);
|
|
|
|
UPDATE session_audit_log
|
|
SET actor_external_user_id = actor_telegram_id::TEXT
|
|
WHERE actor_external_user_id IS NULL;
|
|
|
|
ALTER TABLE session_audit_log
|
|
ALTER COLUMN actor_external_user_id SET NOT NULL;
|
|
|
|
ALTER TABLE session_audit_log
|
|
DROP COLUMN actor_telegram_id;
|