g1t/services/identity/migrations/0024_g1t_name.sql

6 lines342 bytesCodeBlame
1-- g1t's agent is shown as g1t. A run credential made before names its
2-- agent g1t-agent in its scope's JSON (`"agent":"g1t-agent"`), which the
3-- token's principal carries; renamed so a run still going says g1t too.
4UPDATE access_tokens
5SET agent_scope = replace(agent_scope, '"g1t-agent"', '"g1t"')
6WHERE agent_scope LIKE '%"g1t-agent"%';