@startuml
title After: Default Auth Schema = athena (Unless Specified)
skinparam backgroundColor #FAFAFA
skinparam componentStyle rectangle
skinparam defaultFontName Consolas

package "Config" #E8FFF0 {
  component "schema_detection.auth_schema\n(optional override)" as cfg
}

package "Runtime Defaults" #E8F1FF {
  component "DEFAULT_AUTH_SCHEMA = athena" as def
}

package "DB Access" #FFF4E6 {
  component "build_sqlx_adapter()" as build
  component "SqlxAdapter.table_ref(users)" as query
}

database "PostgreSQL" as db

cfg --> build : if set, wins

def --> build : fallback
build --> query
query --> db : athena.users (default)

note bottom of build
Behavior:
- default: athena.*
- explicit config/env: use specified schema
end note
@enduml
