g1t/services/events/migrations/0003_g1t_name.sql

9 lines650 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

g1t is one name: its agent's work, commits and comments show as @g1t, and nobody can claim g1t or g1t-agent1-- g1t's agent is shown as g1t, the name g1t itself goes by. Like a
2-- workspace rename, this is one of the few changes made to logged rows:
3-- what the agent did under its old name, g1t-agent, is shown under the
4-- new one, and filtering the audit log by agent g1t finds all of it.
5UPDATE audit_entries SET actor = 'g1t' WHERE actor = 'g1t-agent';
6UPDATE audit_entries SET agent = 'g1t' WHERE agent = 'g1t-agent';
7UPDATE audit_entries SET on_behalf_of = 'g1t' WHERE on_behalf_of = 'g1t-agent';
8UPDATE events SET actor = 'g1t' WHERE actor = 'g1t-agent';
9UPDATE events SET data = replace(data, '"g1t-agent"', '"g1t"') WHERE data LIKE '%"g1t-agent"%';