Files
sase.tr/apps/api/drizzle/0038_founder_id_text.sql
Semih Yesilyurt 462da4b2c1
Some checks are pending
QA Gate (P0/P1) / Test affected app (pull_request) Waiting to run
fix(internal-admin): founderId uuid → text (status_changed_by, impersonated_by)
Süper Panel lifecycle (suspend/ban/reactivate) ve readonly impersonation
aksiyonları founderId olarak panelin Better Auth kullanıcı ID'sini (32
karakter nanoid) gönderiyor; users.status_changed_by ve
sessions.impersonated_by uuid olduğu için Postgres "invalid input syntax
for type uuid" ile 500 dönüyordu — panelden askıya alma hiç çalışmadı,
impersonation da hiç başarılı olmamış (sessions.impersonated_by tümü NULL).

İki alan da FK'sız salt audit → text. Migration 0038 (0035 numarası main'de
dunning tarafından alınmıştı; eski PR #257 dalı rebase edildi).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ww3tfpuxBcettz81dDvyYt
2026-09-26 12:41:42 +03:00

8 lines
575 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- Süper Panel admin aksiyonları founderId olarak panelin Better Auth
-- kullanıcı ID'sini (32 karakter nanoid, ör. d17M1M3S6c…) gönderiyor; uuid
-- kolonlar bunu reddedip suspend/ban'ı ve readonly impersonation'ı 500 ile
-- düşürüyordu ("invalid input syntax for type uuid"). İki alan da FK'sız salt
-- audit → text. Mevcut UUID değerleri USING ile aynen korunur.
ALTER TABLE "users" ALTER COLUMN "status_changed_by" TYPE text USING "status_changed_by"::text;
ALTER TABLE "sessions" ALTER COLUMN "impersonated_by" TYPE text USING "impersonated_by"::text;