diff --git a/internal/database/migrations/0017_update_audit_events_actions.sql b/internal/database/migrations/0017_update_audit_events_actions.sql new file mode 100644 index 000000000..135177d0d --- /dev/null +++ b/internal/database/migrations/0017_update_audit_events_actions.sql @@ -0,0 +1,27 @@ +-- +goose Up + +UPDATE audit_events +SET action = 'ADDED' +WHERE + action = 'TEAM_MEMBER_ADDED' + AND resource_type = 'TEAM_MEMBER'; + +UPDATE audit_events +SET action = 'REMOVED' +WHERE + action = 'TEAM_MEMBER_REMOVED' + AND resource_type = 'TEAM_MEMBER'; + +-- +goose Down + +UPDATE audit_events +SET action = 'TEAM_MEMBER_ADDED' +WHERE + action = 'ADDED' + AND resource_type = 'TEAM_MEMBER'; + +UPDATE audit_events +SET action = 'TEAM_MEMBER_REMOVED' +WHERE + action = 'REMOVED' + AND resource_type = 'TEAM_MEMBER';