g1t/services/events/migrations/0003_g1t_name.sql
| 1 | -- 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. |
| 5 | UPDATE audit_entries SET actor = 'g1t' WHERE actor = 'g1t-agent'; |
| 6 | UPDATE audit_entries SET agent = 'g1t' WHERE agent = 'g1t-agent'; |
| 7 | UPDATE audit_entries SET on_behalf_of = 'g1t' WHERE on_behalf_of = 'g1t-agent'; |
| 8 | UPDATE events SET actor = 'g1t' WHERE actor = 'g1t-agent'; |
| 9 | UPDATE events SET data = replace(data, '"g1t-agent"', '"g1t"') WHERE data LIKE '%"g1t-agent"%'; |